Capítulo 69 de 116
<StrictMode> opts a subtree into extra development-only checks that surface bugs early — most notably double-invoking component functions and Effects to catch impurity and missing/incorrect cleanup — with zero effect on the production build.
<StrictMode> enables is stripped in production builds — it exists purely to catch bugs while developing, never to change runtime behavior for end users.StrictMode are called twice per render in development (results from one call are used, the other discarded) — this deliberately surfaces render-phase impurity (Ch 18), since a truly pure component produces identical output both times, while an impure one may not.StrictMode runs mount → cleanup → mount again for Effects on initial mount, specifically to catch missing or incorrect cleanup functions (Ch 36) — an Effect that leaks a subscription or duplicates a connection will misbehave under this double-run, revealing the bug in development rather than only in production edge cases (like a fast remount).StrictMode can wrap the whole app (common at the root) or just a specific subtree under active development — it doesn't need to be all-or-nothing.<StrictMode>
<App />
</StrictMode>
StrictMode, fix the underlying impurity/missing cleanup instead.