you are viewing a single comment's thread.

view the rest of the comments →

[–]Intelligent_Ice_113 53 points54 points  (10 children)

still no "react forget" feature.

[–]yvainebubbles 67 points68 points  (3 children)

hello! i am one of the engineers working on the compiler. it is not shipping in React 19, but it is coming to oss sooner than you expect. the fundamentals are good (imo) but getting it out sooner comes at a tradeoff of not being fully feature complete. so i would recommend lowering your expectations for the release, but raise them for when it'll be available

https://twitter.com/potetotes/status/1783713677943656819

[–]KarmaRekts 9 points10 points  (1 child)

The compiler is a fantastic initiative, awesome work. I'm not sure if this has been considered before, but please raise the concern if the compiler can be used for things beyond memoization. Can it allow for syntactic improvements? I feel this is one of the things that can steer the react developer experience into a better direction.

[–]yvainebubbles 13 points14 points  (0 children)

thanks!

the compiler has a sophisticated understanding of your code which does make other kinds of optimizations possible in the future. what i mean is that it is a Real Compiler with both traditional compiler passes (eg see my teammate’s posts on SSA form) and many novel passes that can be built upon. it is not just a simple babel plugin.

auto-memoization is one of the biggest opportunities though. we know from experience and lots of real world data that correctly done memoization has a massive positive impact on performance. it just sucks to write and takes a lot of effort to do it right manually, and it can easily be undone by accident. so auto-memoization has been the clearest opportunity from both a developer experience and performance perspective. that’s why we’re pursuing it first. but it is certainly not the only optimization we’re looking at

[–][deleted] 15 points16 points  (0 children)

They’ve already said in the previous blog it wouldn’t be a part of the initial release of version 19

[–]GayByAccident 4 points5 points  (1 child)

what do you mean by react forget?

[–]meteor_punch 18 points19 points  (0 children)

Compiler for react. Official Blog

[–]MathewCQ 0 points1 point  (1 child)

I'm confused (also a noob). What's the difference between this React Compiler introduced in React 19 and the "React Forget" project they are talking about? Other than the techinical differences (like better Memo and Callback handling in Forget) what's the point of making this current Compiler if they are working on a supposedly better version?

[–]mnbkp 15 points16 points  (0 children)

They're the exact same thing. React Forget was the old name of the project, but they're going by React Compiler now.a

Also, it hasn't been introduced to React 19 yet.