Application-wide bug detection
Enable diagnostics across an entire application during development.
React 19+ · Component
StrictMode enables extra development-only checks for a component subtree. It helps reveal impure rendering, missing Effect or ref cleanup, and deprecated API usage early.
StrictMode is a development-only wrapper that activates extra checks for the component tree inside it. React uses those checks to expose impure rendering, missing Effect or ref cleanup, and deprecated API usage before these problems reach production.
<StrictMode>{children}</StrictMode>A component wrapper that renders its children and enables additional development-only checks for the enclosed tree.
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
function App() {
return <h1>Hello, React!</h1>;
}
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
);Wrap the application root to enable Strict Mode checks throughout the rendered component tree during development.
Enable diagnostics across an entire application during development.
Inspect a feature or subtree without changing the rest of the application.
Detect missing Effect and ref cleanup before production.
createRootuseEffectref callbacks