We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f73358 commit 6b86a6eCopy full SHA for 6b86a6e
packages/react-reconciler/src/ReactFiberCommitWork.js
@@ -355,7 +355,7 @@ function commitHookEffectList(
355
' // ...\n' +
356
' }\n' +
357
' fetchData();\n' +
358
- '}, [someId]);\n\n' +
+ `}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
359
'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
360
} else {
361
addendum = ' You returned: ' + destroy;
0 commit comments