React Compiler in 2026: What It Actually Memoizes
The React Compiler automatically memoizes components, hooks, and callbacks. Learn how to enable it with Next.js.
The React Compiler was released stable with React 19, automatically memoizing components, hooks, and callbacks by analyzing data flow at build time. No need to write dependency arrays, as the compiler infers them. Users can enable this feature in Next.js 15/16 by adding experimental.reactCompiler: true in the next.config.ts file. The compiler opts out of memoization in certain cases, such as direct prop/state mutations or violations of hook rules. Users should run npx react-compiler-healthcheck@latest to see which components are optimized.