Loading video...

Video Failed to Load

Go Home

❌ 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 views • 9 months ago •via X (Twitter)

28 Comments

Rahul Rana's profile picture
Rahul Rana9 months ago

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

George Moller's profile picture
George Moller9 months ago

you got it!

Catalin's profile picture
Catalin9 months ago

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

George Moller's profile picture
George Moller9 months ago

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

Catalin's profile picture
Catalin9 months ago

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

Den's profile picture
Den9 months ago

Finally. Let the compiler handle it 👌

George Moller's profile picture
George Moller9 months ago

Been waiting for this feature! Have you tried it?

Alexey Lyakhov's profile picture
Alexey Lyakhov9 months ago

They should remove useEffect too

George Moller's profile picture
George Moller9 months ago

🤣

Alexey Lyakhov's profile picture
Alexey Lyakhov9 months ago

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

George Moller's profile picture
George Moller9 months ago

pleas do, and share it here!

Alexey Lyakhov's profile picture
Alexey Lyakhov9 months ago

Published my new package enjoy

Alexander's profile picture
Alexander9 months ago

unfortunately, AI often adds unnecessary with React Compiler optimizations

Claudiu's profile picture
Claudiu9 months ago

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 😀.

George Moller's profile picture
George Moller9 months ago

Pretty much yes!

Gregor's profile picture
Gregor9 months ago

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.

Vencedor Zest's profile picture
Vencedor Zest9 months ago

Curious about how it works internally

Christian's profile picture
Christian9 months ago

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

George Moller's profile picture
George Moller9 months ago

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

Pola's profile picture
Pola9 months ago

@javascramble Babel in 2026, dear lord…

George Moller's profile picture
George Moller9 months ago

@javascramble lol

Alexey Lyakhov's profile picture
Alexey Lyakhov9 months ago

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

Iqboljon Hasan's profile picture
Iqboljon Hasan9 months ago

react created rendering issues, and now kinda solving them

Chris's profile picture
Chris9 months ago

What happens to my production code with useMemo & useCallback?

George Moller's profile picture
George Moller9 months ago

what version of react do you have?

Chris's profile picture
Chris9 months ago

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?

Chris's profile picture
Chris9 months ago

@autistikatronik @_georgemoller Got it 🫡

0xd3112's profile picture
0xd31129 months ago

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 😂

Related Videos