Video wird geladen...
Video konnte nicht geladen werden
❌ useMemo, useCallback, memo everywhere ✅ React Compiler handles it automatically React Compiler v1.0 is here. It analyzes your code at build time and adds memoization where needed.↓
63,113 Aufrufe • vor 9 Monaten •via X (Twitter)
28 Kommentare

Here we go as you promised 🙂 React compiler simplifies un-necessary optimization. Really curious to know how it internally manages this things.

you got it!

finally. been waiting for this since the 2024 beta. does it play nice with bun builds or still babel only?

no native support for bun build yet, there is an open issue asking exactly that here:

appreciate it. fwiw the workaround rn is running babel-plugin-react-compiler separately before bun build but it's janky. native support would be clean

Finally. Let the compiler handle it 👌

Been waiting for this feature! Have you tried it?

They should remove useEffect too

🤣

They should remove this hooks from react. I will make eslint-plugin-react-dehookify

pleas do, and share it here!

Published my new package enjoy

unfortunately, AI often adds unnecessary with React Compiler optimizations

This is huge! There were people not using useMemo and useCallback hooks, and people abusing them (guilty of this sometimes 😁). This settles the debate once and for all 😀.

Pretty much yes!

Building my finance app, I've noticed that manual memoization can be tedious and error-prone. Sometimes I've added it where it wasn't needed, which just added complexity. React Compiler's automated approach sounds like a huge relief.

Curious about how it works internally

Is it plug-and-play with any react setup?

you just need to add the babel plugin to whatever build tool you are using: babel-plugin-react-compiler@latest

@javascramble Babel in 2026, dear lord…

@javascramble lol

Created new eslint plugin for those who use react-compiler in existing projects

react created rendering issues, and now kinda solving them

What happens to my production code with useMemo & useCallback?

what version of react do you have?

It’s an older version and I haven’t updated to the latest. I’m curious to know what happens if I update. Should I remove the useMemo and useCallback?

@autistikatronik @_georgemoller Got it 🫡

Im skeptical. Is it better than a junior dev that just learned about those? If you use a usecallback and ask cursor to add some code everything becomes usecallback 😂
