React Best Practices

Chapter 8 · Practice 2 of 4

Keep StrictMode on for the whole app in development

From Project hygiene

Why it matters

Wrapping your app in <StrictMode> adds checks that run only in development:

  • components render twice,
  • effects run twice,
  • deprecated APIs trigger warnings.

These checks surface impure components and missing effect cleanups early, when they are cheap to fix. Frameworks like Next.js enable it by default.