File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ export default FileName;
386386``` javascript
387387import { memo } from ' react' ;
388388
389- const FileName = memo (() => {
389+ const FileName = memo (function FileName () {
390390 return <> $2< / > ;
391391});
392392
@@ -399,7 +399,7 @@ export default FileName;
399399import { memo } from ' react' ;
400400import PropTypes from ' prop-types' ;
401401
402- const FileName = memo ((props ) => {
402+ const FileName = memo (function FileName (props ) {
403403 return <> $2< / > ;
404404});
405405
Original file line number Diff line number Diff line change 487487 "body" : [
488488 " import { memo } from 'react'" ,
489489 " " ,
490- " const ${1:${TM_FILENAME_BASE}} = memo(() => {" ,
490+ " const ${1:${TM_FILENAME_BASE}} = memo(function ${1:${TM_FILENAME_BASE}}() {" ,
491491 " return (" ,
492492 " <>${2:first}</>" ,
493493 " )" ,
504504 " import PropTypes from 'prop-types'" ,
505505 " import { memo } from 'react'" ,
506506 " " ,
507- " const ${1:${TM_FILENAME_BASE}} = memo((props) => {" ,
507+ " const ${1:${TM_FILENAME_BASE}} = memo(function ${1:${TM_FILENAME_BASE}} (props) {" ,
508508 " return (" ,
509509 " <>${2:first}</>" ,
510510 " )" ,
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ const reactFunctionMemoComponent: ComponentsSnippet = {
228228 body : [
229229 ...reactWithMemo ,
230230 '' ,
231- `const ${ Placeholders . ComponentName } = memo(() => {` ,
231+ `const ${ Placeholders . ComponentName } = memo(function ${ Placeholders . ComponentName } () {` ,
232232 ...innerComponent ,
233233 '})' ,
234234 ...exportDefault ,
@@ -243,7 +243,7 @@ const reactFunctionMemoComponentWithPropTypes: ComponentsSnippet = {
243243 "import PropTypes from 'prop-types'" ,
244244 ...reactWithMemo ,
245245 '' ,
246- `const ${ Placeholders . ComponentName } = memo((props) => {` ,
246+ `const ${ Placeholders . ComponentName } = memo(function ${ Placeholders . ComponentName } (props) {` ,
247247 ...innerComponent ,
248248 '})' ,
249249 '' ,
You can’t perform that action at this time.
0 commit comments