0PricingLogin
React Academy · Lesson

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>
);

All lessons in this course

  1. What StrictMode Does
  2. Pure Components & Avoiding Side Effects in Render
  3. Key & Ref Best Practices
  4. Folder Structure & Naming Conventions
← Back to React Academy