The React team has spent years working on a compiler that can automatically optimize your React code. After years of preview, the React Compiler is now stable and the results are impressive — real-world apps are seeing 20–40% fewer re-renders with zero code changes.
What Does the Compiler Actually Do?
At its core, the React Compiler performs automatic memoization. It analyzes your component's data flow at compile time and inserts the equivalent of React.memo, useMemo, and useCallback exactly where they're needed — and only where they're needed. No more wrapping everything defensively.
The compiler works on regular JavaScript too, not just TypeScript. It uses static analysis to understand value identity and referential equality without type information.
Dropping useMemo and useCallback
This is the most immediately impactful change for most codebases. Manually placed useMemo and useCallback calls are brittle — miss one dependency and your memoization silently breaks. With the compiler, you write idiomatic code and it handles the optimization layer automatically.
Real-World Benchmarks
We migrated a large dashboard app (180+ components) to use the React Compiler. TTI improved by 310ms on a mid-range device, interaction latency dropped by 38%, and the bundle size decreased slightly because we removed all the manual memoization boilerplate. The main page component alone shrunk by 60 lines.
The compiler cannot optimize components that violate the Rules of React — things like mutating props or state directly. Run the React Compiler health-check tool before migrating a large codebase.