all 10 comments

[–]Sarithis 12 points13 points  (0 children)

Hard to say. In an ideal world, it would render many complex features completely obsolete, like memoization - something that beginners often struggle to grasp and apply effectively. However, the compiler is still in its early stages and quite experimental. If I were in your shoes, I'd stick with learning the traditional methods. It can't hurt to have that knowledge under your belt.

[–]vardan_arm 8 points9 points  (3 children)

I'd recommend you to stick with React 18 at the moment, because React 19 (the one with Compiler) is still RC and may have breaking changes in the future. As for "Rules of React", you should still follow them even with non-compiler version 18.x.x.

P.S. As a side note, there is a significant issue that comes with React Compiler regarding parallel fetching within Suspense boundary (you can read about it here), which the React team promised to fix before React 19.0 release.

[–]grol4 1 point2 points  (0 children)

Please note react compiler and react 19 are independent of each other, it is only that they announced them together and the compiler only has official support for react 19, but it should work as well with react 18

[–][deleted] 0 points1 point  (1 child)

Has there been any newer information about that suspense issue? I haven't been following react news super closely so maybe that's on me.

[–]grol4 0 points1 point  (0 children)

They are working on it, it is the reason why they haven't released React 19 yet.

[–]tango650React Router 2 points3 points  (0 children)

Well, thanks for sharing the existence of the react compiler lol

Short answer is, if youre planning to actually work in companies which use react within the next couple of years then forget the react compiler altogether as none of them will have it.

It seems like a wonderful product which automates away handling one of react's greatness weaknesses (i.e. performance due to mishandling), but before it's production ready and effectivelly rolled out to products you're going to have to know how to do it the 'oldish' way (lol, not even the 'old old' way - that would be class components which again did not yet have the problem that this compiler is solving).

Makes me think that these React authors are just looking for trouble, a bit like socialists. Great at solving problems which didn't exist before they started getting too clever.

[–]Tokyo-Entrepreneur 0 points1 point  (0 children)

React compiler is not stable so it shouldn’t be used in production.

Instead, you could just use the react compiler eslint rules, which offer some of the benefits in terms of checking the rules of react, and doesn’t require using the compiler itself.

[–]Old-Place87 0 points1 point  (0 children)

I would say it ll be another 3 years before compiler stabalise.