Explain how StrictMode affects function components and hooks#2515
Merged
gaearon merged 6 commits intoreactjs:masterfrom Mar 30, 2020
Merged
Explain how StrictMode affects function components and hooks#2515gaearon merged 6 commits intoreactjs:masterfrom
gaearon merged 6 commits intoreactjs:masterfrom
Conversation
|
Deploy preview for reactjs ready! Built with commit d777c53 |
eps1lon
commented
Oct 29, 2019
Member
|
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
Member
|
I tweaked the explanation a bit to remove distracting details and focus on the essence. |
Member
Author
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 <lex61rus@gmail.com> * 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 <dan.abramov@gmail.com> * Update conferences.md * Update code-splitting.md * Update strict-mode.md Co-authored-by: Vishal Jagtap <jagtap.vishal30@gmail.com> Co-authored-by: Nhan Doan <2561973+nhantdn@users.noreply.github.com> Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com> Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com> Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Jhon Mike <jhon.msdev@gmail.com>
This file contains hidden or 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
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