We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa00128 commit c212942Copy full SHA for c212942
src/sourceSnippets/components.ts
@@ -228,10 +228,10 @@ const reactFunctionMemoComponent: ComponentsSnippet = {
228
body: [
229
...reactWithMemo,
230
'',
231
- `export default memo(function ${Placeholders.FileName}() {`,
+ `const ${Placeholders.FileName} = memo(() => {`,
232
...innerComponent,
233
'})',
234
- '',
+ ...exportDefault,
235
],
236
description: 'Creates a React Memo Function Component with ES7 module system',
237
};
@@ -243,7 +243,7 @@ const reactFunctionMemoComponentWithPropTypes: ComponentsSnippet = {
243
"import PropTypes from 'prop-types'",
244
245
246
- `const ${Placeholders.FileName} = memo(function ${Placeholders.FileName}(props) {`,
+ `const ${Placeholders.FileName} = memo((props) => {`,
247
248
249
0 commit comments