Thanks for the update. Regarding Rust vs Go for the react compiler - Rust's algebraic types make it much easier to write parsers, ASTs and compilers compared to languages without these features.
memoizing is one of things that doesn't feel needed at first but then you find yourself with hundreds of components and everything grinds to a halt. I worked on a project where after around 5 years of development without using memoizing it became so sluggish that we had to skip two release windows just to add memoization to the hundreds if not thousands of components we had until it was usable again.
Probably you wont notice, unless you start digging into performance tab. Unless you are a real customer with shitty pc, bloated OS, full ram and bad network.
Not really at all, the svelte compiler converts it's vanilla js looking signal code into actual js signal code. react compiler produces the same code you could write normally, but with added optimisations that you'd usually add yourself using useMemo, memo, etc
Considering how large the React Compiler codebase is already, I'm not surprised they want to rewrite in Rust straight away instead of something like Go. Rust's strict rules are one of the best ways to wrangle a massive codebase with that many contributors, especially in a context as important as "The Official React Compiler". Unit tests are just not enough to ensure reproducible results between commits. Throw in performance concerns and the possibility of using the React Compiler in the browser through WASM (Go's support in WASM is horrible compared to Rust) and it makes complete sense. Finally, this is a project they've already finished prototyping over the past 3 years. I doubt there's going to be any major changes to the fundamentals going forward. Whether you like it or hate it, the React Compiler is one of the prime examples of where Rust is a good fit for a project.
It's unfair to bring up Go's performance in Wasm in its current state when managed languages have to ship their own GC. Once WasmGC is stable, everyone will jump on languages that actually get shit done.
@@piaIy I don't have any particular gripes with Go, if you like it then have at it! To say it's unfair to comment on Go's lack of performance on WASM is a bit silly though. I also find it silly that you're saying nothing gets done in Rust, in a comment on a video discussing things getting done in Rust. But to more directly address your point, WASM GC isn't enough to make Go viable on WASM. The fundamental issue is WASM is a highly resource constrained environment, so explicit management of resources is required to get even modest performance. Go is a good language, but this is an area where it is just a bad fit. It's like trying to run TypeScript on embedded.
Eh... React devs always gravitated slowly to what other frameworks had already done years ago, while being completely oblivious about it and calling it innovation.
One thing that made react stand out through all the shining new things that get released is that it virtually never forced anything and most improvements are optional and progressive additions you can do. The contrary is not necessarily a deal breaker for most, but when you have huge apps in production and you want upgrades without having to touch every component every few months it can definitely matter. You can still import react from a CDN today and use the non-jsx functions to use react on a single page of an old php app if you want.
I remember a time when memoizing was seen like the devil, and people were like the overhead is much more than rerendering everything. It's funny to see how the times have changed and memoizing is the default now because turns out a check for the cache is almost always going to be faster than recalculating the value.
This biggest problem w/ React right now IMO is the it's too tied to Next/Vercel. I look forward to that problem getting fixed, and will happily stay on alt frameworks like Remix even if it means missing out on or needing to wait a long time for all the latest and greatest React features.
Jack Herrington mentioned that memoization won't work for proxy state, specifically mentioning mobx. What do you think the best solution for that would be? I've been using valtio and that may affect me as well.
@@Leonhart_93 I'm aware they do that step but that's not what makes them proper compilers... It's a feature they generally handle but the fact that this compiler doesn't go across file boundaries is leaving a massive amount of optimization on the table.
what about output file size? compiled output looks substantially more complex. I also wonder how this affects debugging. the addition of a compiler radically changes React code from something where you can easily imagine what the output looks like - the standard React JSX transform is so trivial, so easy to understand and explain. we've sort of lost that. I'm still unsure why I should be more excited about this than about something like Solid, which was designed and built for the kind of performance and scalability React is fighting for... but did so with design rather than by layering more complexity on top of complexity. at the end of the day, doesn't all of this added complexity exist primarily to correct inherent design problems that React itself created?
The necessity of a compiler at such an abstract level has convinced me that React was a pioneer in component-ized architecture, but that React itself, particularly the rendering lifecycle and surrounding architecture, is not it. React's "children" frameworks and architectures built around signals and other reactivity systems will be the future. Just not sure how far into the future. React has effectively gone from a rendering library inside of a programming language, to a scripting language (as it is written by developers).
Hi, I'm a begginer fullstack developer, and I'm leraning react. I'm kinda feeling lost with the Overhelming quantit of information there is about It. I learned a lot of concepts, how to use hooks, etc. And now there is this react compiler I literally didn't knew about the existance... Can comeone give me some tips of what I should study to get into te market? I'm already building wesites, but I'm scared I'm missing out on something I should know and I don't wight now...
If it leads to the removal of unused code in react dom, so we don't download 140 kb library, it would be great. That's the point of using build tools . Like what we have in Svelte other than that, it's a nice update
Very exciting stuff. Since this is so new upon release date it would be nice if they left on Vite the new compile version and as well as the standard React project download version. I am assuming the compiler version will be excellent for certain use cases.
No. Both where wrong. Solution is a simpler, more predictable framework than react. Compiling makes things even more opaque. Try to debug in that code.
I can't believe the React team took this many years to realise that they could deliver a much better developer experience and much better app performance by using a compiler. All the actually great frameworks started out with a compiler because they knew how key it was from the beginning.
@@geekofia it's been touted as just a library but has over the years gained more and more of the typical features of a framework and it doesn't compete against libraries, it competes against frameworks. Just search React vs and all the results will be it getting compared to frameworks.
That was lie :) I think that the "cost" was that they were scared that you'll use to much memory that it will affect performance. I personally ignored that advice at some point and started memoizing EVERYTHING and it always had only positive effect on performance.
@@havokgames8297 no, memoization has a runtime cost which checks the equity of current and next value by using Object.is(or such things) method, to update the value or decide some actions for components depends on the situation. They said "rerendering is a small thing and react is so performant about that, but updating real dom is a expensive thing" maybe 1001240 times. Now they put memoization everywhere under the hood. I cant understand
6:46 I found a bug in your wording. Check the spelling of etcetera, then listen to yourself say it. I used to say it that way until one day I went to write etc. but instead I wrote ect., then I thought, that can't be right. I figured out the glitch in my matrix, and uploaded a patch.
No shit Theo, this format much much better that your normal videos. Not much opinions, enjoying the news, not much reactions. Hopefully you will keep it up.
Manual memoization (performance in general) and forwardRef were really always my biggest reasons to switch to other frameworks. With both of these changes, I dont see any reason to switch anymore. I think React has the best mental model now, making the code easy to understand and reason about, without having to know the internals. I am especially talking about DX not about the complexity of the internal code. Even though I love solid, i much rather use spread operators instead of helper functions like "mergeProps". It just feels more natural to use. Also using variables instead of calling function to get the reactive state. And don't let me start with Vue magic and ".value" insanity. It's so odd to retain reactivity. Same with Svelte. I don't like the crazy magic and custom file extentions to make these frameworks work. Either tsx or ts. Solid was the only real alternative, but with these changes and the existing insane ecosystem, I really don't see a reason to leave react behind. We have to understand and also appreciate, that react was ome of the first and they need the time to fix core issues from framework level now, which they are always trying to do.
@@nephis_2006 i know you can use tsx, but it's not the default. I tried it once and the resources were lacking, as every blog post was about SFC. If you opt-out of default behaviour you always have different kind of problems. Also not every team member would want to use tsx.
I'm at a conference but rather than enjoy myself, socialize, meet and talk to people and relax - I ran away to my secluded hotel room to talk, alone to myself. Find the bar, nerd.
To be honest, IG in the web moves like s**t and makes my browser run out of RAM if I open several tabs, which is quite an incredible feat for an online image / short video viewer.
Don't worry, it's a JS framework, it'll change forever again next week
🤣🤣🤣
So true lmao
Facts
Don't write it down. It's going to change next week.
😅😅😅 the reason now i make own spa js . enough is enough nightmare . enough re invent the wheel bugs
We write TSX that becomes JSX that becomes JS that becomes "Compiled" JS that becomes ByteCode
Porque, Maria
Devs just want more magic to be more productive
Meanwhile vanillajs gets more capable all the time :)
Is that a Pablo Francisco reference, my dude?
Because it's totally cross platform. Web code is actually useful code.
nothing stops you from building dekstop apps using C and QT if you want
The best feature of React is it puts food on my family
I know how hard that is
compiled food probably
And the only good feature
yea that thing kicks ass😅
“Don’t write this down. It will all change next week”
lmaoo i was thinking the same
Legendary
Well played sir, well played.
Kai
Bro was so excited he made the video on the old DVD camcorder he found in the trash.
💀
Omg lmao
Fun fact, I actually had the camera on a mini tripod on a sideways trash can
@@t3dotgg I don't think it's that bad
@@alexanderhorner Well yeah it's viewable, it's more funny if anything.
Watching solely to support the no-stupid-face-on-thumbnail approach 🙃
Thanks for the update. Regarding Rust vs Go for the react compiler - Rust's algebraic types make it much easier to write parsers, ASTs and compilers compared to languages without these features.
memoizing is one of things that doesn't feel needed at first but then you find yourself with hundreds of components and everything grinds to a halt. I worked on a project where after around 5 years of development without using memoizing it became so sluggish that we had to skip two release windows just to add memoization to the hundreds if not thousands of components we had until it was usable again.
forcing stuff to be updated only when it actually needs to - is a big challenge indeed
I have one question , isnt our bundler be much more in size since the compiler is adding more code for caching?
i cannot WAIT to see what this does for our UI performance
I love how much Payload is benefitting from the newest next and react changes! Glad you guys are putting in crazy effort to adapt so quickly
Probably you wont notice, unless you start digging into performance tab. Unless you are a real customer with shitty pc, bloated OS, full ram and bad network.
It will add 10 minutes to your build time
Cannot wait to see how many new bugs it will introduce
So, the compiler basically does what Svelte's compiler has been doing so far but for React?
Neat
Also with the less line of code too. Svelte5next is 124.961 lines. Facebook devs are geniuses.
Yeah, now we got sveltes good practice on an actual good framework*
Not really at all, the svelte compiler converts it's vanilla js looking signal code into actual js signal code. react compiler produces the same code you could write normally, but with added optimisations that you'd usually add yourself using useMemo, memo, etc
@@zuma206 Yeah, it's a footGun remover. Not even a full compiler to optimize your code, at least yet.
@@zuma206 "You would write normally" - Have you seen gibberish that compiler spits out?
Considering how large the React Compiler codebase is already, I'm not surprised they want to rewrite in Rust straight away instead of something like Go. Rust's strict rules are one of the best ways to wrangle a massive codebase with that many contributors, especially in a context as important as "The Official React Compiler". Unit tests are just not enough to ensure reproducible results between commits. Throw in performance concerns and the possibility of using the React Compiler in the browser through WASM (Go's support in WASM is horrible compared to Rust) and it makes complete sense. Finally, this is a project they've already finished prototyping over the past 3 years. I doubt there's going to be any major changes to the fundamentals going forward.
Whether you like it or hate it, the React Compiler is one of the prime examples of where Rust is a good fit for a project.
It's unfair to bring up Go's performance in Wasm in its current state when managed languages have to ship their own GC. Once WasmGC is stable, everyone will jump on languages that actually get shit done.
@@piaIy I don't have any particular gripes with Go, if you like it then have at it! To say it's unfair to comment on Go's lack of performance on WASM is a bit silly though. I also find it silly that you're saying nothing gets done in Rust, in a comment on a video discussing things getting done in Rust.
But to more directly address your point, WASM GC isn't enough to make Go viable on WASM. The fundamental issue is WASM is a highly resource constrained environment, so explicit management of resources is required to get even modest performance. Go is a good language, but this is an area where it is just a bad fit. It's like trying to run TypeScript on embedded.
Funny how when Vue used a compiler (and still does), React devs used to say "I don't like compilers doing magic for me"
Eh... React devs always gravitated slowly to what other frameworks had already done years ago, while being completely oblivious about it and calling it innovation.
@@cocoscacao6102 So react is the Apple of frameworks?
React is like apple of javascript devs
One thing that made react stand out through all the shining new things that get released is that it virtually never forced anything and most improvements are optional and progressive additions you can do.
The contrary is not necessarily a deal breaker for most, but when you have huge apps in production and you want upgrades without having to touch every component every few months it can definitely matter.
You can still import react from a CDN today and use the non-jsx functions to use react on a single page of an old php app if you want.
React spending all this time fixing issues of their own making.
Yeah, a framework so flawed that it needs its own compiler to avoid unintended side-effects during render.
I remember a time when memoizing was seen like the devil, and people were like the overhead is much more than rerendering everything. It's funny to see how the times have changed and memoizing is the default now because turns out a check for the cache is almost always going to be faster than recalculating the value.
Who moved on to SolidJs or Svelte for good?
Forever? That's weird! Usually react only changes for a short period! :o
Don't worry, its React, They will fix it again next version
JavaScript changes so often Theo'll come back after the next talk and update saying it's been replaced with the next shiny thing already.
React is not javascript.
@@hobbit125 If it is js library it is js..
Most likely by Pheonix-Framework in Elixir/Erlang
Or static hermes
@@matthewgiallourakis7645 next in the line...dynamic herpes
I feel like react changes forever every other month
Hey, please can you tell me what Theme you are using in VS code?
This biggest problem w/ React right now IMO is the it's too tied to Next/Vercel. I look forward to that problem getting fixed, and will happily stay on alt frameworks like Remix even if it means missing out on or needing to wait a long time for all the latest and greatest React features.
Next.js with OpenNext works wonderfully in docker
hey roland great news you can actually use react without next or vercel just like theo did this entire video
How does it affect bundle size?
Smaller, but don't look at build times
Doesn't this affect bundle size though?
My thoughts exactly. What about memory footprint as well?
For me it feels the compiler is result of something being wrong in the core of react in the first place
Indeed, if they used signals all this would be redundant.
It's awesome to see this problem being fixed after so long time.
It's sad that this is a problem we created for ourselves. 😅
If you mean fixing like fixing a broken leg with a band-aid, than you are right 😂
ngl Theo, liked this format of video a lot more than the heavily produced ones :)
React changes forever every year. It's how we keep the javascript programmers too busy to work in other sectors.
Frontend developers are not programmer 😅😂😂😂😂
Jack Herrington mentioned that memoization won't work for proxy state, specifically mentioning mobx. What do you think the best solution for that would be? I've been using valtio and that may affect me as well.
Now this compiler might actually be an improvement that will make me add something new for the first time in the past 5 years.
Does this eliminate all unnecessary re-renders and the need for other techniques like building the component further up and passing it down as a prop?
Will webpack, vite are still working with such a new React compiler?
Welcome on the darkside of using compiler.
Signed the Angular Community for 8 years
A compiler that doesn't work across file boundaries? WAT?!?!?
More of just a parser or transpiler with some predefined find and replace properties😂
@@TimLouw Even real compilers do that step.
@@Leonhart_93 I'm aware they do that step but that's not what makes them proper compilers... It's a feature they generally handle but the fact that this compiler doesn't go across file boundaries is leaving a massive amount of optimization on the table.
That's literally every C or C++ compiler when you turn Link Time Optimization off. It's really more common than you think
First hand experience in delivering updates/news. Thanks man!
what about output file size? compiled output looks substantially more complex. I also wonder how this affects debugging.
the addition of a compiler radically changes React code from something where you can easily imagine what the output looks like - the standard React JSX transform is so trivial, so easy to understand and explain. we've sort of lost that.
I'm still unsure why I should be more excited about this than about something like Solid, which was designed and built for the kind of performance and scalability React is fighting for... but did so with design rather than by layering more complexity on top of complexity.
at the end of the day, doesn't all of this added complexity exist primarily to correct inherent design problems that React itself created?
new week, more complexity!
What are those menu icons after the recording one?
Agajn?
My thoughts exactly
Team Svelte
Sexy tan lines 👀 Now that’s the T3 Skater Boy we all know and love!
>Compiler built in rust.
Of course it is. Why isnt Rust in the browsers already? Javascript is slowing us so much.
it's hard to take Theo seriously when he does these 20min clickbait videos every other day about react changing
…I mean it is changing though lol
Svelte had to exist, just so that react could become less shitty.
Theo is the CNN of React lol this is where i get my react news
>implying CNN is a reliable news source in the first place
The necessity of a compiler at such an abstract level has convinced me that React was a pioneer in component-ized architecture, but that React itself, particularly the rendering lifecycle and surrounding architecture, is not it. React's "children" frameworks and architectures built around signals and other reactivity systems will be the future. Just not sure how far into the future.
React has effectively gone from a rendering library inside of a programming language, to a scripting language (as it is written by developers).
Hype! Hype! Hype!!🎉🎉🎉😂😂😂
Hi, I'm a begginer fullstack developer, and I'm leraning react. I'm kinda feeling lost with the Overhelming quantit of information there is about It. I learned a lot of concepts, how to use hooks, etc. And now there is this react compiler I literally didn't knew about the existance... Can comeone give me some tips of what I should study to get into te market? I'm already building wesites, but I'm scared I'm missing out on something I should know and I don't wight now...
This is some cool stuff. I am glad that React is taking this direction.
Anyone look at memory utilization with the new compiler? I want to see if it’s the same.
React compiler only works with react 19? If yes, then how do we use it on existing projects?
Time to move to solid?
I've never been so confused in my life
Great video,
I'm happy I could catch up
Congrats on making a video without a silly face thumbnail! It's great 🔥
Will this also affect react Native
wait, is this already in vuejs?
If it leads to the removal of unused code in react dom, so we don't download 140 kb library, it would be great. That's the point of using build tools . Like what we have in Svelte other than that, it's a nice update
React changed forever for 3 months.
Imagine trying to use a hammer, but each time you use it the handle is different
So how much does this add to the bundle size?
This guy yapp so much!!
Very exciting stuff. Since this is so new upon release date it would be nice if they left on Vite the new compile version and as well as the standard React project download version. I am assuming the compiler version will be excellent for certain use cases.
This is great, now we need static hermes on mobile then react is the only tool one needs for everything
"React code" and "elegant" in the same sentence. Laughing in Vue.
So basically rich harris was right
Basically he always is
No. Both where wrong. Solution is a simpler, more predictable framework than react. Compiling makes things even more opaque. Try to debug in that code.
@@StephanHoyer I think Svelte 5 is pretty easy to debug. We don't need more React craziness. There are better alternatives.
@SilvestreVivo I don't mean react. I find it aweful, too. But there are much simpler alternatives that don't need compilation at all. Like mithriljs.
@@StephanHoyer mithriljs? hahah I am migrating a project from mithriljs to Svelte because is extremely difficult to maintain. Let's be serious please.
TL;DR it’s Svelte now
So it got better, F for SolidJs
I love your videos bro thanks for the info
Very promising. Thank you!
funny seeing you with natural lighting then KRAZAM drops The Solar Sermon
The 14 inch mbp aspect ratio feels very weird but i kinda like it
Off topic: I love the hair. How do you make you hair curly/wavey like that?
I went to a different climate (Vegas) and didn't blowdry my hair this morning. This is technically how it "naturally looks"
@@t3dotgg nice
sometimes I think... need go back to art, one simple pencil which never changes
well your keyboard never changes and the techniques you're going to use in art are going to be different overtime
I remember when React first released and I had to choose between react or angularJS as the current two main techs lol
I can't believe the React team took this many years to realise that they could deliver a much better developer experience and much better app performance by using a compiler. All the actually great frameworks started out with a compiler because they knew how key it was from the beginning.
React wasn't a framework, it was a library. Now it's becoming a framework.
@@geekofia it's been touted as just a library but has over the years gained more and more of the typical features of a framework and it doesn't compete against libraries, it competes against frameworks. Just search React vs and all the results will be it getting compared to frameworks.
Our belowed React Paster Theo.
What happened to "memoziation comes with a cost" and "dont overuse useMemo and memo" things? omg everything is memoized now.
That was lie :)
I think that the "cost" was that they were scared that you'll use to much memory that it will affect performance. I personally ignored that advice at some point and started memoizing EVERYTHING and it always had only positive effect on performance.
It came at a cost of having to manually put that code everywhere. That cost has now been shifted to just a bundle size cost.
@@havokgames8297 no, memoization has a runtime cost which checks the equity of current and next value by using Object.is(or such things) method, to update the value or decide some actions for components depends on the situation. They said "rerendering is a small thing and react is so performant about that, but updating real dom is a expensive thing" maybe 1001240 times. Now they put memoization everywhere under the hood. I cant understand
It just converts between JSX and JS, it's not a compiler it's a transpiler
gcc just converts between C and machine code, it's not a compiler it's a transpiler
so they were the ones lagging github
6:46 I found a bug in your wording. Check the spelling of etcetera, then listen to yourself say it. I used to say it that way until one day I went to write etc. but instead I wrote ect., then I thought, that can't be right. I figured out the glitch in my matrix, and uploaded a patch.
React never stops changing lol
it changes forever with each announcement
People say this but at the same time... React has been on v18 for years
hype god
No shit Theo, this format much much better that your normal videos. Not much opinions, enjoying the news, not much reactions. Hopefully you will keep it up.
is this something that is being built into ‘next dev’?
We need to make Theo implement a compiler in Go and in Rust.
Manual memoization (performance in general) and forwardRef were really always my biggest reasons to switch to other frameworks. With both of these changes, I dont see any reason to switch anymore.
I think React has the best mental model now, making the code easy to understand and reason about, without having to know the internals. I am especially talking about DX not about the complexity of the internal code.
Even though I love solid, i much rather use spread operators instead of helper functions like "mergeProps". It just feels more natural to use. Also using variables instead of calling function to get the reactive state.
And don't let me start with Vue magic and ".value" insanity. It's so odd to retain reactivity. Same with Svelte. I don't like the crazy magic and custom file extentions to make these frameworks work. Either tsx or ts.
Solid was the only real alternative, but with these changes and the existing insane ecosystem, I really don't see a reason to leave react behind.
We have to understand and also appreciate, that react was ome of the first and they need the time to fix core issues from framework level now, which they are always trying to do.
fyi you dont need .vue to have a vue project
@@nephis_2006 i know you can use tsx, but it's not the default. I tried it once and the resources were lacking, as every blog post was about SFC. If you opt-out of default behaviour you always have different kind of problems. Also not every team member would want to use tsx.
Just now noticed... Theo is somewhat similar to Freddie Mercury. More so than Rami Malek...
Just stop at 0:15 and imagine him with short hair 😄
I'm at a conference but rather than enjoy myself, socialize, meet and talk to people and relax - I ran away to my secluded hotel room to talk, alone to myself. Find the bar, nerd.
To be honest, IG in the web moves like s**t and makes my browser run out of RAM if I open several tabs, which is quite an incredible feat for an online image / short video viewer.
ur hair looks good at this length
That’s not length, it’s 1-based indexing
Wait until next week... It'll change again. :D
"Don't bother writing any of this down is going to change next week"
- Programmers are also human
I ran out of breath for you watching this
Hot take: every piece of software changes forever after every release
This sounds like it is going to be memory hungry! React VDOM is just a bad abstraction
Tomorrow: React Just Changed Forever and Ever
Next week: Next.js Just Changed Web Development
Next month: React Just Changed Forever, But This Time For Real
2 Month later: Next.js Just Changed Everything, But This Time "EVERYTHING"
3 Month later: React Got Rid of `use()`
4 Month later: Next.js Revives `use()` and Changes The Fundamental Thinking of Web Development.
So the compiler just memoizes everything and hides the mess from you?
React is Svelte now
0 days since react changed forever
So, they basically got yet another step closer to imitating Elm since 2012?
Theo, you're amazing