React Just Changed Forever
Ғылым және технология
React Conf just happened, and it's been a wild ride. React 19 is out, but that's old news. We're here for something almost forgotten, something I've wanted for awhile.
The React Compiler is here. I'm so hyped.
SOURCES
playground.react.dev
react.dev/learn/react-compiler
• React Compiler: In-Dep...
github.com/facebook/react/pul...
Check out my Twitch, Twitter, Discord more at t3.gg
S/O Ph4seOn3 for the awesome edit 🙏
Пікірлер: 311
Don't worry, it's a JS framework, it'll change forever again next week
@rohil3023
16 күн бұрын
🤣🤣🤣
@sulavbaral9972
16 күн бұрын
So true lmao
@thederpykrafter
16 күн бұрын
Facts
@michacuranda5603
15 күн бұрын
Don't write it down. It's going to change next week.
@sanglin9387
15 күн бұрын
😅😅😅 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
@andreilucasgoncalves1416
16 күн бұрын
Devs just want more magic to be more productive
@furycorp
16 күн бұрын
Meanwhile vanillajs gets more capable all the time :)
@friendly__drone9352
16 күн бұрын
Is that a Pablo Francisco reference, my dude?
@steftrando
16 күн бұрын
Because it's totally cross platform. Web code is actually useful code.
@unkouwnfigure2746
15 күн бұрын
nothing stops you from building dekstop apps using C and QT if you want
“Don’t write this down. It will all change next week”
@OccupyMars-le9gy
16 күн бұрын
deep cut, love it
@nathnaelwondisha6649
15 күн бұрын
lmaoo i was thinking the same
@wlockuz4467
15 күн бұрын
Legendary
@Senai
15 күн бұрын
Well played sir, well played.
@darksideishere
15 күн бұрын
Kai
The best feature of React is it puts food on my family
@TypingHazard
16 күн бұрын
I know how hard that is
@SilvestreVivo
15 күн бұрын
compiled food probably
@wlockuz4467
15 күн бұрын
And the only good feature
@warrenarnold
14 күн бұрын
yea that thing kicks ass😅
Bro was so excited he made the video on the old DVD camcorder he found in the trash.
@siriusmain1763
16 күн бұрын
💀
@novnod
16 күн бұрын
Omg lmao
@t3dotgg
16 күн бұрын
Fun fact, I actually had the camera on a mini tripod on a sideways trash can
@alexanderhorner
16 күн бұрын
@@t3dotgg I don't think it's that bad
@IoIxD
16 күн бұрын
@@alexanderhorner Well yeah it's viewable, it's more funny if anything.
Watching solely to support the no-stupid-face-on-thumbnail approach 🙃
So, the compiler basically does what Svelte's compiler has been doing so far but for React? Neat
@gageracer
16 күн бұрын
Also with the less line of code too. Svelte5next is 124.961 lines. Facebook devs are geniuses.
@user-mx1ek4sl2m
15 күн бұрын
Yeah, now we got sveltes good practice on an actual good framework*
@zuma206
15 күн бұрын
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
@gageracer
15 күн бұрын
@@zuma206 Yeah, it's a footGun remover. Not even a full compiler to optimize your code, at least yet.
@Booyamakashi
15 күн бұрын
@@zuma206 "You would write normally" - Have you seen gibberish that compiler spits out?
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.
Funny how when Vue used a compiler (and still does), React devs used to say "I don't like compilers doing magic for me"
@cocoscacao6102
14 күн бұрын
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.
@labilawal
14 күн бұрын
@@cocoscacao6102 So react is the Apple of frameworks?
@Me-vc4sf
14 күн бұрын
React is like apple of javascript devs
@oceantume
12 күн бұрын
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.
@Novacification
8 күн бұрын
Yeah, a framework so flawed that it needs its own compiler to avoid unintended side-effects during render.
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.
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.
First hand experience in delivering updates/news. Thanks man!
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
@readywhen
15 күн бұрын
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
@Booyamakashi
15 күн бұрын
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.
@HUEHUEUHEPony
14 күн бұрын
It will add 10 minutes to your build time
@yoz0__
7 күн бұрын
Cannot wait to see how many new bugs it will introduce
Hey, please can you tell me what Theme you are using in VS code?
What are those menu icons after the recording one?
ngl Theo, liked this format of video a lot more than the heavily produced ones :)
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.
@piaIy
15 күн бұрын
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.
@zactron1997
15 күн бұрын
@@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.
Will webpack, vite are still working with such a new React compiler?
Great video, I'm happy I could catch up
it's hard to take Theo seriously when he does these 20min clickbait videos every other day about react changing
@averagepickleballplayer
15 күн бұрын
…I mean it is changing though lol
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.
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.
@hobbit125
15 күн бұрын
React is not javascript.
@RaZziaN1
15 күн бұрын
@@hobbit125 If it is js library it is js..
@davidsiewert8649
15 күн бұрын
Most likely by Pheonix-Framework in Elixir/Erlang
@matthewgiallourakis7645
15 күн бұрын
Or static hermes
@SirusStarTV
13 күн бұрын
@@matthewgiallourakis7645 next in the line...dynamic herpes
Forever? That's weird! Usually react only changes for a short period! :o
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?
Who moved on to SolidJs or Svelte for good?
For me it feels the compiler is result of something being wrong in the core of react in the first place
@offlercrocgod
15 күн бұрын
Indeed, if they used signals all this would be redundant.
React compiler only works with react 19? If yes, then how do we use it on existing projects?
So how much does this add to the bundle size?
I feel like react changes forever every other month
Don't worry, its React, They will fix it again next version
How does it affect bundle size?
@HUEHUEUHEPony
14 күн бұрын
Smaller, but don't look at build times
new week, more complexity!
Welcome on the darkside of using compiler. Signed the Angular Community for 8 years
Doesn't this affect bundle size though?
@lumiannah
14 күн бұрын
My thoughts exactly. What about memory footprint as well?
Agajn?
@Frazful
16 күн бұрын
My thoughts exactly
This is some cool stuff. I am glad that React is taking this direction.
A compiler that doesn't work across file boundaries? WAT?!?!?
@TimLouw
15 күн бұрын
More of just a parser or transpiler with some predefined find and replace properties😂
@Leonhart_93
14 күн бұрын
@@TimLouw Even real compilers do that step.
@TimLouw
14 күн бұрын
@@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.
@theshermantanker7043
11 күн бұрын
That's literally every C or C++ compiler when you turn Link Time Optimization off. It's really more common than you think
funny seeing you with natural lighting then KRAZAM drops The Solar Sermon
Now this compiler might actually be an improvement that will make me add something new for the first time in the past 5 years.
React changes forever every year. It's how we keep the javascript programmers too busy to work in other sectors.
@warrenarnold
14 күн бұрын
Frontend developers are not programmer 😅😂😂😂😂
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. 😅
@StephanHoyer
15 күн бұрын
If you mean fixing like fixing a broken leg with a band-aid, than you are right 😂
I love your videos bro thanks for the info
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.
@juxuanu
15 күн бұрын
Next.js with OpenNext works wonderfully in docker
@WilliamWelsh
15 күн бұрын
hey roland great news you can actually use react without next or vercel just like theo did this entire video
Svelte had to exist, just so that react could become less shitty.
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?
Very promising. Thank you!
This guy yapp so much!!
Imagine trying to use a hammer, but each time you use it the handle is different
This is great, now we need static hermes on mobile then react is the only tool one needs for everything
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.
Our belowed React Paster Theo.
Huge news!
So basically rich harris was right
@SilvestreVivo
15 күн бұрын
Basically he always is
@StephanHoyer
15 күн бұрын
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.
@SilvestreVivo
15 күн бұрын
@@StephanHoyer I think Svelte 5 is pretty easy to debug. We don't need more React craziness. There are better alternatives.
@StephanHoyer
15 күн бұрын
@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.
@SilvestreVivo
15 күн бұрын
@@StephanHoyer mithriljs? hahah I am migrating a project from mithriljs to Svelte because is extremely difficult to maintain. Let's be serious please.
The 14 inch mbp aspect ratio feels very weird but i kinda like it
Sexy tan lines 👀 Now that’s the T3 Skater Boy we all know and love!
I remember when React first released and I had to choose between react or angularJS as the current two main techs lol
Congrats on making a video without a silly face thumbnail! It's great 🔥
We need to make Theo implement a compiler in Go and in Rust.
TL;DR it’s Svelte now
@joaofrancisco5781
15 күн бұрын
So it got better, F for SolidJs
Will this also affect react Native
Off topic: I love the hair. How do you make you hair curly/wavey like that?
@t3dotgg
16 күн бұрын
I went to a different climate (Vegas) and didn't blowdry my hair this morning. This is technically how it "naturally looks"
@alexanderhorner
16 күн бұрын
@@t3dotgg nice
wait, is this already in vuejs?
Hype! Hype! Hype!!🎉🎉🎉😂😂😂
"React code" and "elegant" in the same sentence. Laughing in Vue.
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
I've never been so confused in my life
How much does the compiler increase bundle size? With all the extra if statements etc
@aldi_nh
16 күн бұрын
its compiler dude, do you include babel and typescript in your bundle?
@dedicatedserver8214
16 күн бұрын
@@aldi_nh no, it adds code into your bundle though to memorize components
@MrQuezPL
15 күн бұрын
but he is right. Obviously we won't be including all the compiler code, but we definitely will include output from the compiler with additional optimisation overhead
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
15 күн бұрын
React wasn't a framework, it was a library. Now it's becoming a framework.
@TimLouw
14 күн бұрын
@@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.
ur hair looks good at this length
@rob011
15 күн бұрын
That’s not length, it’s 1-based indexing
React changed forever for 3 months.
is this something that is being built into ‘next dev’?
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.
what is this aspect ratio? 20:13 ???
I ran out of breath for you watching this
Theo, you're amazing
hype god
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.
Time to move to solid?
here before @malix ????
0 days since react changed forever
Team Svelte
MobX and chill.
a pull request with 1900 commits, grab a snack the code review may take a while...
Hot take: every piece of software changes forever after every release
Wait until next week... It'll change again. :D
@crism8868
16 күн бұрын
"Don't bother writing any of this down is going to change next week" - Programmers are also human
sometimes I think... need go back to art, one simple pencil which never changes
@gabbeeto
12 күн бұрын
well your keyboard never changes and the techniques you're going to use in art are going to be different overtime
React is Svelte now
that mic makes it look like you've been shot.
so they were the ones lagging github
It just converts between JSX and JS, it's not a compiler it's a transpiler
@mihailmojsoski4202
13 күн бұрын
gcc just converts between C and machine code, it's not a compiler it's a transpiler
theo got new teeth?
So the compiler just memoizes everything and hides the mess from you?
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.
Someone please tell Theo there is an entire world of software out there besides JavaScript. A language by the way that was conceived and written in 10 days. Draw your own conclusions about the implications of that.
Tomorrow: React Just Changed Forever and Ever
@habong17359
15 күн бұрын
Next week: Next.js Just Changed Web Development
@habong17359
15 күн бұрын
Next month: React Just Changed Forever, But This Time For Real
@habong17359
15 күн бұрын
2 Month later: Next.js Just Changed Everything, But This Time "EVERYTHING"
@habong17359
15 күн бұрын
3 Month later: React Got Rid of `use()`
@habong17359
15 күн бұрын
4 Month later: Next.js Revives `use()` and Changes The Fundamental Thinking of Web Development.
I was about to learn svelte wat
@prestigealanazi2993
15 күн бұрын
I thought that will change a little of the syntax or coding simplicity , but seems no , therefore I would still learn svelte kit and capacitor js ( as it seems the best easiest way ) for the backend tho I think I will mix between asp , node and mongodb
yes the react team went a different way with the compiler because instead of doing what signals already fixed they decided to hide the garbage behind this magic compiler