Back to results for “Hooks”
React › Strict Mode & Concurrent Features

Should you leave Strict Mode enabled in your app permanently, or only use it temporarily?

Beginner

Answer

Strict Mode is generally recommended to stay enabled throughout an entire project's development, since it continues to help catch new problems as the codebase grows and changes over time. It has no effect at all on the production build, so there is no downside to leaving it on during development.
// A typical setup, Strict Mode wraps the whole app and stays enabled long term
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

createRoot(document.getElementById('root')).render(
  <StrictMode>
    <App />
  </StrictMode>
);
Real-world example A team keeps Strict Mode enabled across their entire project's lifetime, catching several small bugs introduced by new features over time before they ever reached real users in production.

Common follow-ups: Are there any legitimate reasons a team might choose to disable Strict Mode for part of their app?;How would you gradually introduce Strict Mode into a large existing codebase that was not using it before?