File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -228,10 +228,10 @@ const reactFunctionMemoComponent: ComponentsSnippet = {
228
228
body : [
229
229
...reactWithMemo ,
230
230
'' ,
231
- `export default memo(function ${ Placeholders . FileName } () {` ,
231
+ `const ${ Placeholders . FileName } = memo(() => {` ,
232
232
...innerComponent ,
233
233
'})' ,
234
- '' ,
234
+ ... exportDefault ,
235
235
] ,
236
236
description : 'Creates a React Memo Function Component with ES7 module system' ,
237
237
} ;
@@ -243,7 +243,7 @@ const reactFunctionMemoComponentWithPropTypes: ComponentsSnippet = {
243
243
"import PropTypes from 'prop-types'" ,
244
244
...reactWithMemo ,
245
245
'' ,
246
- `const ${ Placeholders . FileName } = memo(function ${ Placeholders . FileName } (props) {` ,
246
+ `const ${ Placeholders . FileName } = memo((props) => {` ,
247
247
...innerComponent ,
248
248
'})' ,
249
249
'' ,
You can’t perform that action at this time.
0 commit comments