Benchmark Results
The React team’s internal benchmarks show meaningful gains in render-heavy scenarios. In the JS Framework Benchmark, React with the compiler shows approximately 15–20% improvement in interaction-to-next-paint metrics for list-heavy UIs.
Real-world gains depend heavily on how much unnecessary re-rendering your current codebase performs. Applications with aggressive manual memoization may see smaller gains; applications that never used memoization may see the largest improvements.
When You Still Need useMemo and useCallback in 2026
1. External State Management Libraries
Libraries like Zustand, Jotai, and Redux Toolkit operate outside React’s component model in ways the compiler cannot fully analyze. If you are deriving computed values from an external store and passing them as props, manual useMemo on derived external state remains necessary.
2. Third-Party Libraries Expecting Stable References
Chart libraries (Recharts, Victory), map libraries (Mapbox GL, Leaflet), and certain animation libraries (GSAP integrations) perform reference equality checks outside React’s reconciler. These still require stable references via useCallback or useMemo.
3. Concurrent Mode Edge Cases
When using useTransition and useDeferredValue, there are edge cases where manually stabilizing expensive computations provides more predictable performance. This is particularly relevant for typeahead search components filtering large datasets.
When you need an explicit performance boundary — a component that should never re-render regardless of parent state changes — React.memo combined with useCallback remains the most explicit and auditable approach.
Migration Guide: What to Actually Delete
- Enable the compiler and run your test suite. If tests pass, the compiler has correctly analyzed your components.
- Run React DevTools Profiler on your most interaction-heavy pages.
- Remove
useMemo hooks that wrap pure computations with no external dependencies — prime candidates for deletion.
- Remove
useCallback hooks on event handlers passed only to native HTML elements or well-behaved React components.
- Retain
useCallback where the callback is passed to a third-party library or a custom hook that performs reference comparison.
- Retain
useMemo for expensive computations on large datasets, selector functions over external stores, and object/array values passed as context.
Known Third-Party Compatibility Issues
React Hook Form: Versions prior to 7.50 have known incompatibilities with the compiler’s memoization of register and control references. Upgrade to 7.51+ before enabling the compiler.
TanStack Query: The select option on useQuery can cause issues — the compiler may over-memoize the selector. TanStack has shipped fixes in v5.28+.
The Verdict
React Compiler v1.0 is a genuine advancement that makes React applications faster with less developer effort. The mental model shift in 2026: use memoization hooks intentionally for documented performance contracts with external libraries, not defensively as a general optimization practice. The compiler handles the defensive case. You handle the intentional case.
Comments · 0
Beta: comments are stored locally on your device and not visible to other readers.
No comments yet. Be the first to share your thoughts.