Skip to content
Codmaker
ReactPerformanceTech

React Compiler: Goodbye useMemo?

React 19's optimizing compiler promises to automate memoization. I tested it on a large codebase to see if manual optimization is truly dead.

Codmaker

Codmaker

Independent product lab

Published
8 min read
Share
React Compiler: Goodbye useMemo?

The promise of 'React Forget'

We've spent years fighting re-renders with `useMemo` and `useCallback`. The React Compiler automates this by analyzing data flow during the build step. If a value doesn't change, the component doesn't re-render. It sounds magical, but does it work in practice?

Field report

I migrated a heavy dashboard with 50+ charts. I removed all `useMemo` hooks. The result? A 15% reduction in code volume and indentical—sometimes better—performance metrics. The compiler is smart enough to memoize not just at the component boundary, but at the hook level.

  • No more dependency array management
  • Cleaner, more readable component bodies
  • Setup is trivial in Next.js 15+

Gotchas

It's not bulletproof. If you have side-effects in your render phase (which you shouldn't anyway), the compiler might aggressive optimize them away. Strict Mode compliance is now mandatory.

Share

Continue

Read more from the lab

45 engineering deep-dives on AI, n8n, mobile architecture, and the patterns we ship Codmaker's own products with.

Browse all articles
View all →