What StrictMode Does
Understand double-invocation and deprecated API warnings in development.
Welcome
In this lesson you will learn what React.StrictMode does in development, which warnings it surfaces, and how it helps you write safer React code.
What Is StrictMode?
StrictMode is a special React component that wraps part of your tree and enables extra checks **in development only**. It has zero effect on the production build.
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>
);