What is React Compiler? It is a stable build tool that memoizes React components and hooks. It can reuse work across renders when inputs have not changed.
That may make updates faster and cut the need for manual useMemo, useCallback, and memo. It does not fix a slow network, poor React state ownership, or a logic bug. Measure your own app before and after you turn it on.
Start with a live baseline from real user tasks. Compare the same build, data, browser, and device class with the tool on and off. Keep the old path until logic and speed checks pass.
| React Compiler can help with | Your team still owns |
|---|---|
| Reusing JSX and computed results in React components and hooks. | Choosing state bounds and data flow. |
| Skipping some cascading child render work. | Network, database, images, and bundle costs. |
| Adding memoization without wrapping each component by hand. | Logic, tests, access needs, and live checks. |
| Emitting optimized code at build time. | Tool setup, scope checks, rollout, and rollback. |
React announced Compiler 1.0 on October 7, 2025. The current guide calls it stable. Treat adoption as a tracked build change with a clear rollback path.
What is React Compiler actually compiling?
The compiler scans the source of components and hooks during the build. It emits code that caches selected values and JSX. Its main goal is to cut repeat work during updates. A parent update can cause child functions to run again even when their inputs have not changed. The tool can reuse parts of that work if its scan shows they are safe.
This is narrower than “make React fast.” It does not add a broad cache for each JavaScript function. A costly helper called from many components may still run once in each component. It does not share cached results across the whole app. The React guide advises a trace before adding a new cache for such helpers. It also does not fetch data faster, shrink an image, or change a slow server response.
The tool relies on the Rules of React. Components should render from props and state with no hidden side effects or mutations of past values. A build may skip a component it cannot optimize safely. That is a scope sign, not proof that the whole app failed. The setup guide says lint errors can flag skipped components while other code is still compiled.
Manual memoization and compiler output are linked but not the same. A Memo ✨ badge in React DevTools shows that a component was compiled. You still need a trace and a real task to know whether fewer renders matter, plus logic tests so reduced renders never leave stale UI.
The short Better Stack video attached to this article gives a quick mental model. Use the official React documentation and your own build for setup and decisions.
A before-and-after example without a speed promise
Consider a catalog pane that filters rows when its items input changes. It also has a local menu state. If the parent changes only the menu, filtering the same rows again may be wasted work. A team might first add a manual useMemo:
import { useMemo } from 'react';
function Catalog({ items, query, menuOpen }) {
const visible = useMemo(
() => items.filter((item) => item.name.includes(query)),
[items, query],
);
return <CatalogView items={visible} menuOpen={menuOpen} />;
}
With the tool, new code can state the math at once and let the build tool decide what to reuse:
function Catalog({ items, query, menuOpen }) {
const visible = items.filter((item) => item.name.includes(query));
return <CatalogView items={visible} menuOpen={menuOpen} />;
}
These snippets show the planned work; they are not a benchmark. The result depends on inputs, view shape, tool scope, and filter cost. A small list may be cheaper to recalc than to reason about. A huge shared data set may need its own cache or a server-side query. Trace the real task before you call either form better.
Do not remove current useMemo, useCallback, or React.memo use across a codebase on day one. React advises keeping existing memoization or testing each cut with care. Some code needs stable references for an effect dependency array. Deleting a manual hook can change compiler output and app logic.
What the build tool does not solve
The best reason to try the tool is repeat render work in an app that is sound. If a route is slow because it downloads too much JavaScript, moving data and code may help more. If a table freezes because a handler runs a costly sync search, time that handler. If a view sees a new object from an outside hook on each update, the tool may still have to revisit parts of the tree. No build plugin can make unstable inputs stable by decree.
The tool also cannot make impure render logic correct. A view that changes an array from props or treats useMemo as a firm pledge can break when tuning changes. React’s debug guide flags code that relies on a cache to stay correct, such as effects tied to object IDs. Fix that design first. Speed work should keep the same clear result for the same inputs.
There is a second limit: not each view will be built with the tool. React describes a safe skip when a scan finds code that may break its rules. It can still build other views.
That means a good build is not the same as full scope. Inspect lint output, check the built bundle, and look for the DevTools badge in the part of the app you plan to test. When a view is skipped, treat the cause as code health work instead of forcing a blind tune.
The October 2025 React post lists gains seen in chosen products. Those figures are vendor results from named apps. They do not predict a gain in yours. Before rollout, write down which tasks feel slow and how much change would help your users.
React version and build-tool compatibility
React 19 is the simplest target, but the tool can also target React 17 and 18. The older versions need react-compiler-runtime and a set target, as the config guide explains. Check the tool package and React runtime versions as a pair. Do not assume a React 19 form works unchanged with React 18.
| Project path | Docs route | Check before rollout |
|---|---|---|
| React 19 with Babel. | Put babel-plugin-react-compiler first in the Babel plugin list. |
Confirm your stack runs that Babel path. |
| React 17 or 18. | Install the runtime package and set target to 17 or 18. |
Confirm the build emits code for the chosen runtime. |
Vite with @vitejs/plugin-react 6 or later. |
Use the docs’ reactCompilerPreset with @rolldown/plugin-babel. |
Check plugin versions and order against the current Vite guide. |
| Older Vite React plugin. | Use its inline Babel path from the docs. | Check whether the project still has that path. |
| Next.js, Expo, Metro, or Rsbuild. | Follow the stack path linked from React. | Check which build stage the stack calls. |
This table is a route aid, not a stand-in for the current setup page. Build tools change apart from React. In this case, React’s Vite guide splits @vitejs/plugin-react 6.0.0 and later from older versions. Do not copy a Vite snippet from an old post into a new setup without checking that split.

Vite template selection showing the React Compiler setup option.
The tool must see source code before other Babel transforms change it. If your project uses SWC, another JSX transform, or a TypeScript 6 build pipeline, check the real pipeline instead of assuming one Babel plugin file is enough. The React guide links to stacks with their own setup. A rollout plan that has not checked built output has not yet tested the tool.
Install it and verify that it ran
Start with a branch and a known-good build. For a React 19 Babel project, the current setup guide starts with npm install -D babel-plugin-react-compiler@latest and puts 'babel-plugin-react-compiler' first in plugins. Record the exact package version in the lockfile. A live rollout should not jump to a new tool release between the small test and broad launch.
For React 17 or 18, add the runtime package from the docs and set the tool target to your main React version. For Vite, use the right React plugin route for your version. For Next.js or Expo, follow their linked stack guides. Do one build before changing app code. If it fails, you can split a setup fault from a component fault.
Then use three checks. First, run the React Hooks ESLint rules and review tool findings. The React guide points to eslint-plugin-react-hooks and its recommended-latest preset.
Second, open a key screen in React DevTools and look for the Memo ✨ badge on a component you expect. Third, inspect a dev or live build for the cache code made by the tool. These checks answer “did it run?” They do not yet answer “did it help?”

React DevTools Profiler showing the Memo badge on a compiled component.
Keep a short scope log: route, view, tool status, lint warning, and whether the route has a sound speed baseline. A badge on one view does not prove full route scope. A skip may be fine for old code while the rest of the route is tested. Show the build scope before reading the speed trace.
If the badge is missing, check the real build path, plugin order, and whether the file can use the tool. Check whether an override left out its folder or opt-in mode needs a "use memo" tag. Do not add hand-set memo at once. That would make it harder to tell what the tool changed.
Measure a baseline before a small test
Choose two or three tasks users repeat: open a filter menu, edit a row, switch a tab, or type in a large form. Record the route, device class, browser, build mode, data size, and network state. A dev build may have far more overhead than the live build, so compare the same build type. Run each case a few times and keep the traces instead of quoting one lucky run.
Use the React Profiler to find commits and views that take time. Pair that with a user-facing check such as input lag or task time when you can. Watch for bugs as well as gains.
For example, a route can render less but still load more code or trigger an effect too often. Set a pass gate before reading the new results: no logic change, no clear slow down in key flows, and a tracked gain in at least one costly update. Set the numbers from your app’s baseline and product need, not a fixed rule.
Test the same data and task with the tool on and off. Keep other package upgrades out of the test if you can. If a task changes, inspect what happened before you blame the tool. Even when it makes fewer renders, a faster server or a smaller list could explain the time shift. The best local proof is a repeat trace with only the build path changed.
Roll out in a way you can reverse
The step-by-step rollout guide gives three paths: apply the plugin to chosen folders, use compilationMode: 'annotation' with "use memo" on chosen functions, or put built code behind a runtime flag. Choose one path that fits the size and health of your app. One team-owned route is easier to inspect than the whole app at once.
Folder overrides work when code bounds are clear. Opt-in mode gives finer control but needs a tag on each chosen view or hook. A gate lets a flag choose between built and plain code for a group, but the flag and its check path need tests too. The config guide covers the gating option. Treat its sample as the source of truth for your tool version instead of making up a flag API for live use.
Start with an in-house or small outside group. Check known tasks, error reports, and traces for both groups. Expand only if the app stays right and the tracked gain meets your gate. Record which routes and package versions were in the small test. If the tool affects only a few views, note that before you read a page-wide score.

Phased feature-flag rollout from internal testing and canary release to rollback.
Keep a rollback that you have tried. For a gated build, test the off state and how fast it reaches users. For a folder or opt-in rollout, keep the prior build ready to ship and a small code change to remove the tool scope. At the view level, React lists the "use no memo" tag for a short-term opt-out while you check a bug. Do not leave the tag as an unexplained long-term patch.
The rollback trigger should name clear faults. Cases include wrong screen data, an effect loop, new input lag in a key task, or a new error tied to built code. If a small test goes badly, turn off that path, save a repro, and compare the same task without the tool. Do not blame the tool just because an issue appeared after the build. A hidden Rules of React flaw may have shown up under the new cache.
Existing cache use and troubleshooting
When speed improves, you may want to delete old useMemo and useCallback calls for cleaner code. Keep that as its own change. React’s guide says they can stay and act as an escape hatch for stable values. Removing one may affect an effect link or change tool output. Test each cut with the same logic and trace checks as the first rollout.
If a screen acts in a new way, narrow the scope. First, compare the built and plain path with the same data. Next, use "use no memo" in one affected view or turn off the folder or gate. Then inspect changes made during render, unstable links, and code that relies on object ID to stay correct. The React debug guide lays out these steps and asks for a small repro before you report a tool bug.
If speed does not improve, ask which work was costly. The target view may have been skipped. The render may be cheap next to network or layout.
Inputs may change each time, leaving little to reuse. A helper may run outside the tool’s cache scope. The right result may be “keep the tool for simpler code,” “fix a new block,” or “remove it from this route.” Do not report a gain without a tracked user task.
Live rollout checklist
Before broad rollout, a reviewer should be able to answer these questions from a short record:
- Which React and tool versions, build tool, and setup path were tested?
- Which routes and views used the tool, and which were skipped by lint?
- Which user tasks and devices formed the baseline, and where are the traces?
- Did logic, access needs, and key effects stay intact in both paths?
- Did the tool improve a costly update without a clear bug elsewhere?
- How can the group, folder, or view opt-out be used to roll back?
- Who owns the choice to expand, pause, or remove the tool?
The answer can be “not yet.” React Compiler is stable, but your app may have more urgent work than repeat render cost. If you adopt it, treat its output as one part of a wider speed plan. Keep tests, traces, clear state bounds, and a rollback plan. That gives the tool a fair trial and gives users the same sound app whether the tuning stays or goes.



