Skip to content

React Strict Mode causes re renders #610

Answered by typeofweb
kendrice asked this question in Q&A
Discussion options

You must be logged in to vote

Components' apparent double-rendering in Strict Mode in React is expected:

When Strict Mode is on, React remounts every component once after mount (state and DOM are preserved). This helps you find Effects that need cleanup and exposes bugs like race conditions early. Additionally, React will remount the Effects whenever you save a file in development. Both of these behaviors are development-only.

It doesn't affect production builds.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by typeofweb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants