-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explain how StrictMode affects function components and hooks #2515
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploy preview for reactjs ready! Built with commit d777c53 |
eps1lon
commented
Oct 29, 2019
Let's remove "only if it uses Hooks". This really isn't an important detail, and as you sent a PR, we'll change that. |
eps1lon
commented
Mar 29, 2020
I tweaked the explanation a bit to remove distracting details and focus on the essence. |
That is much better, thanks! |
jhonmike
added a commit
to jhonmike/reactjs.org
that referenced
this pull request
Jul 1, 2020
* - Updated the conference date of React Summit Amsterdam. (reactjs#2860) - App.js Conf 2020 is cancelled due to the COVID-19 * Update outdated URL in code-splitting.md (reactjs#2870) * Update outdated URL Next.js Dynamic Import. * Update code-splitting.md Co-authored-by: Alexey Pyltsyn <[email protected]> * Explain how StrictMode affects function components and hooks (reactjs#2515) * Update strict-mode.md * Fix links * docs: specify which kind of function component * Update content/docs/strict-mode.md * Update strict-mode.md Co-authored-by: Dan Abramov <[email protected]> * Update conferences.md * Update code-splitting.md * Update strict-mode.md Co-authored-by: Vishal Jagtap <[email protected]> Co-authored-by: Nhan Doan <[email protected]> Co-authored-by: Alexey Pyltsyn <[email protected]> Co-authored-by: Sebastian Silbermann <[email protected]> Co-authored-by: Dan Abramov <[email protected]> Co-authored-by: Jhon Mike <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The StrictMode docs were not updated with the release of hooks and it isn't obvious which hooks are invoked twice.
Codesandbox for the new cases: https://codesandbox.io/s/strictmode-double-invokation-xdpxj
Encountered this question in
Preview: https://deploy-preview-2515--reactjs.netlify.com/docs/strict-mode.html#detecting-unexpected-side-effects