Skip to content

Commit

Permalink
Use same example code for async effect warning (facebook#15118)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Mar 22, 2019
1 parent 8f73358 commit 6b86a6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberCommitWork.js
Expand Up @@ -355,7 +355,7 @@ function commitHookEffectList(
' // ...\n' +
' }\n' +
' fetchData();\n' +
'}, [someId]);\n\n' +
`}, [someId]); // Or [] if effect doesn't need props or state\n\n` +
'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
} else {
addendum = ' You returned: ' + destroy;
Expand Down

0 comments on commit 6b86a6e

Please sign in to comment.