Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

❌ 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 görüntüleme • 9 ay önce •via X (Twitter)

28 Yorum

Rahul Rana profil fotoğrafı
Rahul Rana9 ay önce

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

George Moller profil fotoğrafı
George Moller9 ay önce

you got it!

Catalin profil fotoğrafı
Catalin9 ay önce

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

George Moller profil fotoğrafı
George Moller9 ay önce

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

Catalin profil fotoğrafı
Catalin9 ay önce

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 profil fotoğrafı
Den9 ay önce

Finally. Let the compiler handle it 👌

George Moller profil fotoğrafı
George Moller9 ay önce

Been waiting for this feature! Have you tried it?

Alexey Lyakhov profil fotoğrafı
Alexey Lyakhov9 ay önce

They should remove useEffect too

George Moller profil fotoğrafı
George Moller9 ay önce

🤣

Alexey Lyakhov profil fotoğrafı
Alexey Lyakhov9 ay önce

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

George Moller profil fotoğrafı
George Moller9 ay önce

pleas do, and share it here!

Alexey Lyakhov profil fotoğrafı
Alexey Lyakhov9 ay önce

Published my new package enjoy

Alexander profil fotoğrafı
Alexander9 ay önce

unfortunately, AI often adds unnecessary with React Compiler optimizations

Claudiu profil fotoğrafı
Claudiu9 ay önce

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 profil fotoğrafı
George Moller9 ay önce

Pretty much yes!

Gregor profil fotoğrafı
Gregor9 ay önce

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 profil fotoğrafı
Vencedor Zest9 ay önce

Curious about how it works internally

Christian profil fotoğrafı
Christian9 ay önce

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

George Moller profil fotoğrafı
George Moller9 ay önce

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

Pola profil fotoğrafı
Pola9 ay önce

@javascramble Babel in 2026, dear lord…

George Moller profil fotoğrafı
George Moller9 ay önce

@javascramble lol

Alexey Lyakhov profil fotoğrafı
Alexey Lyakhov9 ay önce

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

Iqboljon Hasan profil fotoğrafı
Iqboljon Hasan9 ay önce

react created rendering issues, and now kinda solving them

Chris profil fotoğrafı
Chris9 ay önce

What happens to my production code with useMemo & useCallback?

George Moller profil fotoğrafı
George Moller9 ay önce

what version of react do you have?

Chris profil fotoğrafı
Chris9 ay önce

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 profil fotoğrafı
Chris9 ay önce

@autistikatronik @_georgemoller Got it 🫡

0xd3112 profil fotoğrafı
0xd31129 ay önce

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 😂

Benzer Videolar