React Compiler 1.0 - You Can Delete Your useCallback Hooks Now
React Compiler 1.0 shipped in October 2025. Delete most of your React.memo, useCallback, and useMemo calls. The compiler handles memoization automatically — and more granularly than you were doing by hand.
Next.js 16 (also October) made Turbopack the default bundler with 2-5x faster builds. Bun 1.3 shipped full-stack runtime support. The entire React ecosystem got a performance upgrade without requiring you to rewrite anything.
Before and After
Before: you wrapped components in React.memo, dependencies in useCallback, and expensive calculations in useMemo. You forgot half the time. When you remembered, you maintained dependency arrays by hand.
After: the compiler analyzes your code and memoizes values used in rendering. It memoizes conditionally — something you could not do manually.
This code:
function Form({ onSubmit, onMount }) {
// your component logic
}
Now behaves as if you wrapped onSubmit and onMount in useCallback and Form in React.memo. You did not have to write any of that manually because the compiler handles it during the build.
You write cleaner code. The compiler catches edge cases you would miss. Same philosophy as TypeScript — let the tooling do the work.
When You Still Need Manual Memoization
Important
One place: useEffect dependencies. If you pass a value to useEffect and want to control when it runs, wrap it in useMemo.
The official React blog explains this: manual memoization guarantees reference stability for effect dependencies. The effect only runs when the dependency changes in value, not on every render.
Setting It Up
React Compiler requires React 19+. For React 17 or 18, you also need react-compiler-runtime@latest.
With Next.js
Next.js 16 has the compiler integrated. Update your config:
// next.config.js
const nextConfig = {
experimental: {
reactCompiler: true,
},
};
Next.js handles the Babel plugin setup automatically.
With Vite
Vite uses esbuild by default, so you add the Babel plugin manually. The trade-off: automatic memoization at the cost of Babel overhead in your build.
Install:
npm install babel-plugin-react-compiler@latest
Configure:
// vite.config.js
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [
react({
babel: {
plugins: ["babel-plugin-react-compiler"],
},
}),
],
});
The React Compiler must run first in your Babel plugin pipeline. @vitejs/plugin-react handles this when configured as shown.
Note
Pure esbuild builds are fast. Adding the React Compiler introduces Babel, which is slower. For most projects, runtime performance gains outweigh the build time cost. If your codebase is large and build time is critical, benchmark both.
The Vite team is working with oxc on native compiler support. Once that ships alongside Rolldown, you get automatic memoization without Babel. The React docs will update with migration info when that happens.
Turbopack Goes Default
Next.js 16 shipped Turbopack as the default bundler in October. Vercel runs production sites on it (vercel.com, v0.app, nextjs.org). Their benchmarks show 2-5x faster builds depending on project size.
Fast Refresh is about 10x quicker, which is the difference between grabbing coffee during a rebuild and seeing the change instantly.
Next.js 15.5 (August) had Turbopack in beta. Two months later it became the default.
Bun 1.3 added full-stack runtime support and compiles entire apps into standalone binaries. While not directly related to React Compiler, this is part of the same trend: tools getting faster without changing how you write code.
What Shifted
Manual optimization became automatic optimization. Your codebase is cleaner without memo wrappers. The compiler catches optimization opportunities you would miss.
Next.js switching to Turbopack as the default signals this is production-ready. They run their own infrastructure on it.
What To Do
- Update to React 19+ (or 17/18 with react-compiler-runtime)
- Install the compiler:
npm install babel-plugin-react-compiler@latest - Configure it (Next.js: experimental flag, Vite: Babel plugin)
- Remove React.memo from components where it is not needed
- Remove most useCallback/useMemo (keep for useEffect deps)
- Watch your bundle size and build times
The React Compiler installation guide has framework-specific setup for Next.js, Remix, Vite, and others. The Next.js 16 announcement covers Turbopack details.
Compiler 1.0 and Turbopack becoming default are not about learning new patterns. The tools got better while you keep writing the same code.