StrictMode Double Invocation
In development, StrictMode intentionally runs component render functions (and useState/useMemo/useReducer initializers) twice and runs each effect's setup, cleanup, then setup again. This surfaces impure renders and non-idempotent effects that would otherwise only break under concurrent rendering, remounting, or Fast Refresh — production behavior is unchanged.
This Concept is waiting for its first lesson!
In development, StrictMode intentionally runs component render functions (and useState/useMemo/useReducer initializers) twice and runs each effect's setup, cleanup, then setup again. This surfaces impure renders and non-idempotent effects that would otherwise only break under concurrent rendering, remounting, or Fast Refresh — production behavior is unchanged.
Are you a teacher? Sign in to start contributing.
Sign In