ReactPerformance
The React Compiler: Goodbye useMemo and useCallback?
Bondon Datta Nov 15, 2026 5 min read
For years, React performance meant sprinkling useMemo, useCallback and React.memo across a codebase. It worked, but it made components harder to read.
The React Compiler analyses your components at build time and adds memoization for you. In most projects you can simply write plain, readable code and let the compiler handle re-render optimization.
It is not magic, though. The compiler relies on you following the Rules of React: components must be pure, props and state must not be mutated, and hooks must be called at the top level.
Enabling it in Next.js is a single option in next.config. Turn it on, run your app and use the React DevTools to see which components were optimized.