React 19 has a Problem

Sdílet
Vložit
  • čas přidán 17. 06. 2024
  • React 19 has a problem, and that's speed. With a new change to how suspense works, the SAME CODE behaves massively different in how it's executed between 18 and 19. I love what Tk Dodo does for the react community, and turns out, the react team listened to his (and others) concerns.
    --- sources
    tk_dodos blog article (great read!!): tkdodo.eu/blog/react-19-and-s...
    -- my links
    second channel (in depth videos): / @joshtriedupstash
    discord: / discord
    github: github.com/joschan21
  • Věda a technologie

Komentáře • 114

  • @idk_who_am_i2748
    @idk_who_am_i2748 Před 10 dny +28

    Im not a JS dev but im confused by the logic applied from react devs. WHY would you change the default behavior of a functionality if there are other options or rather it should be the developer that fixes the issue. If you have an expensive component why not make it also be self suspending that would eliminate the need to throw away the first render. Or if that is not possible than why not add an "attribute" to Suspense defining how it handles its children. for example default is "parallel" if you need to you set it to "sequential".

    • @wlockuz4467
      @wlockuz4467 Před 10 dny +16

      This feels like classic React. Create a problem then discuss solutions.

    • @marcuss.abildskov7175
      @marcuss.abildskov7175 Před 10 dny +4

      It'd classic React. Fix problems by causing more problems.

    • @lalit5408
      @lalit5408 Před 9 dny

      because it is not changing any default behavior. Suspense is going to be release in full with React 19 only. The behavior that these lib authors used was still beta. If you didn't notice only lib authors are complaining about this, because they went ahead and used React's internal/beta features.

    • @Ivcota
      @Ivcota Před 9 dny

      Bro our community engineers just to engineer. Like we need to solve important problems, not make problems to be solved like a jimmy neutron episode

  • @incarnateTheGreat
    @incarnateTheGreat Před 10 dny +45

    This is why they have release candidates. People test it out and find issues like these. Hope it gets sorted.

    • @drewhjava
      @drewhjava Před 10 dny +1

      Na, this is why you have words. You use those words to talk to people before making sweeping changes like this.

    • @incarnateTheGreat
      @incarnateTheGreat Před 10 dny +1

      @@drewhjava wo...wor.....ds?

    • @philheathslegalteam
      @philheathslegalteam Před 10 dny

      This is actually a good change.
      We are seeing a literal 1 second delay in skeletons showing due to expensive rendering passes down the tree.
      React better release their component to fix this though.

  • @wlockuz4467
    @wlockuz4467 Před 10 dny +12

    So much for an "unopinionated" JavaScript "library". React is a damn circus.

  • @owenwexler7214
    @owenwexler7214 Před 10 dny +7

    So looks like I’m staying on React 18/NextJS 14 for the foreseeable future

  • @pplytas
    @pplytas Před 10 dny +2

    Great vid! I noticed "disk cache" on the first example, doesn't that mean they are returned form the browser cache?

  • @buddy.abc123
    @buddy.abc123 Před 10 dny +10

    Only react has these problems

  • @JollyCoding
    @JollyCoding Před 10 dny +6

    Very curious to see what the solution to this is since they’ve walked back. Seems they liked this feature at Facebook and it helped them.
    Easiest way would seemingly be a prop for the method, parallel or waterfall on each Suspense. Default it to parallel.

  • @nasko235679
    @nasko235679 Před 10 dny +6

    "Still recommend preloading but recognize it's not always practical" What do they mean by that? Sure you can preload initial data serverside but if the component is dynamic with dynamic data (like what most of react is used for) you need parallel fetching. I have no idea what they were thinking with this. Am I just missing something?

    • @IvanKleshnin
      @IvanKleshnin Před 9 dny +3

      Dude, they literally call SPA approach a "legacy mindset of building FE apps". Going all-in for the Backend-centric rendering. Now we're expected to clean freaking browser cache from the server... The proclaimed benefit is "performance" but IMO it's more about control over ecosystem than anything else.

    • @andrewdrone
      @andrewdrone Před 9 dny +2

      Lol. So they're saying Google Maps is built on a legacy mindset? That's rich...

    • @nasko235679
      @nasko235679 Před 9 dny +1

      @@IvanKleshnin I'd get it if this was ruby on rails or laravel + livewire where serverside rendering is integrated properly, but they expect us to do that in NextJS ? Yeah no, that's crazy. The whole point of react is client side responsiveness, if they take that away might as well use HTMX+backend of choice and call it a day.

    • @IvanKleshnin
      @IvanKleshnin Před 9 dny

      @@andrewdrone yep, just today we've got another controversy. This time it's React-19 being 6x slower than React-18 on some SPA example. The release is suspended and they apologize like "We forgot that many people still use SPA and other legacy tech. But don't worry, we'll fix your problem". So, assumingly, it's a shame and a problem that some people use SPA and don't buy into new shiny NextJS approach @_@ I agree with all your points btw 🤝

  • @gufoscuro
    @gufoscuro Před 3 dny +1

    "Pretty fast, in the tradition of react" - I wouldn't really remember React for its speed :)

  • @jonny555333
    @jonny555333 Před 10 dny +3

    Does this only apply to client components? Or also RSC with suspense?

    • @devagr
      @devagr Před 10 dny

      only client components, RSCs still fetch in parallel

  • @jamshediqbal7936
    @jamshediqbal7936 Před 10 dny +12

    Fortunately, I haven't used suspense and don't have plans to use in future 🙂

    • @excalibur2417
      @excalibur2417 Před 10 dny

      You definitely should use it but certainly not in react 19 for now.

    • @null_spacex
      @null_spacex Před 10 dny

      How do you do partial rendering/streaming?

    • @jonny555333
      @jonny555333 Před 10 dny +3

      Suspense is actually great, though. If you're currently not using suspense in situations you could benefit from, that means you're effectively waiting for everything to load before showing anything to the user which is worse than even the react 19 version of suspense.

  • @algobuddy
    @algobuddy Před 10 dny +9

    Looks like React 19 is trying out the new "slow and steady wins the race" strategy-except it's losing😆

  • @ThingEngineer
    @ThingEngineer Před 10 dny +6

    React is THE problem.

  • @Tyheir
    @Tyheir Před 10 dny

    Just add a prop to enable sequential rendering. This is where partial pre rendering will come in handy.

  • @zakidzz
    @zakidzz Před 10 dny

    what extention browser you use????

  • @botondvasvari5758
    @botondvasvari5758 Před 10 dny +2

    its problem is that its a cyptic shit that shouldnt be used anywhere

  • @gkkkk7507
    @gkkkk7507 Před 5 dny

    Hi Josh. Programmierst du uns eine Schach-Website?

  • @aymenbachiri-yh2hd
    @aymenbachiri-yh2hd Před 10 dny

    Thank you so much

  • @faridguzman91
    @faridguzman91 Před 10 dny +15

    vue or svelte is the way. we need to jquery react.

    • @dvh_bzr
      @dvh_bzr Před 10 dny

      never.

    • @justafreak15able
      @justafreak15able Před 10 dny +5

      Exactly Vue, Svelte or Solidjs are much much better.

    • @gcash49
      @gcash49 Před 10 dny

      none of those are big enough improvements to react objectively

    • @justafreak15able
      @justafreak15able Před 10 dny

      @@gcash49 What qualifies to be objectively better? perfs? bundle size? reactivity? maintainability ? DX? cause react is behind in most of these aspects. But definitely react has a very huge community and a lot of loyalists.

    • @marcuss.abildskov7175
      @marcuss.abildskov7175 Před 10 dny

      Angular

  • @catbb
    @catbb Před 10 dny +3

    “listening to our problem” 😹
    i mean they created the problem

  • @siyedyoussef3202
    @siyedyoussef3202 Před 10 dny +13

    svelte 5 in this time 👀

    • @gamingwolf3385
      @gamingwolf3385 Před 10 dny +2

      No nooooo , i try it before , its awesome but has less community packages / libraries and the support of typescript in svelte components is weird
      Thats it everything else is good

    • @MennoB-sk8tv
      @MennoB-sk8tv Před 10 dny

      They have all you need nowadays even shadcn

    • @AlanDanielx
      @AlanDanielx Před 10 dny

      @@gamingwolf3385you are way too outdated on svelte 😂 Svelte 5 supports TS everywhere with no problems

    • @tekoh
      @tekoh Před 10 dny

      @@gamingwolf3385 You don't need a svelte specific library/package. If it works on standard sites it works on svelte.

    • @AdlerWeber
      @AdlerWeber Před 10 dny +1

      @@gamingwolf3385 I believe Svelte 5 solved the inability to use TS outside . Generally, yes, Svelte has a smaller community, but I find shadcn-svelte works great, and TS/JS libraries work without a framework-specific wrapper. I far prefer it to React

  • @ThingEngineer
    @ThingEngineer Před 10 dny +1

    Only react would release a ‘mandatory waterfall feature’…

  • @ashatron656
    @ashatron656 Před 9 dny

    Great vid mate!
    Sure it's good they listened... But why did they make such a breaking change without feedback in the first place?
    JS land is embarrassing at times.

  • @juanmartinguillen4876
    @juanmartinguillen4876 Před 10 dny +3

    React is the new jQuery

  • @sarcasticdna
    @sarcasticdna Před 10 dny

    Now let's fix the compiler and then introduce some bugs in react 21

  • @AlanDanielx
    @AlanDanielx Před 10 dny +3

    Svelte 5 FTW

  • @javierperezmarin6039
    @javierperezmarin6039 Před 10 dny

    I use suspense alot, i think it will slow most of the people that use it.
    I think it should be a prop in the Suspense component, somthin flike

  • @1weiho
    @1weiho Před 10 dny +4

    const [solution, setSolution] = useVue()

  • @muhriddinxusniddinov9015

    thank you bro, it's very amazing

  • @PlayBASIC-Developer
    @PlayBASIC-Developer Před 10 dny

    Doesn't impact me .. interesting though

  • @BUY_YOUTUB_VIEWS_842
    @BUY_YOUTUB_VIEWS_842 Před 10 dny

    Why don't people pay more attention to this??

  • @electroheadfx
    @electroheadfx Před 10 dny +2

    React (facebook) is like Adobe, need to switch away from

  • @sangyoonpark2757
    @sangyoonpark2757 Před 10 dny

    Yay

  • @Gaijin101
    @Gaijin101 Před 9 dny +2

    Glad we decided to move away from react. Tired of these insane changes. All these 'fixes' and its still significantly compared to Solid, Vue, Svelte.

  • @HideBuz
    @HideBuz Před 10 dny +4

    3s is fast? Bro, real programmers measure in micro or milli seconds.

    • @SW-fh7he
      @SW-fh7he Před 10 dny +1

      No 😂

    • @andrewdrone
      @andrewdrone Před 9 dny +1

      A slug is fast if you compare it to a sloth, fwiw

  • @abhinavjoshi224
    @abhinavjoshi224 Před 10 dny

    Gonna stick with React 18 till 2026...😂

  • @weeb3277
    @weeb3277 Před 10 dny +1

    yo!

  • @ChichaGad
    @ChichaGad Před 10 dny +3

    Solid JS is the future

  • @daphenomenalz4100
    @daphenomenalz4100 Před 10 dny

    NextJs should have been built on Go nd htmx or something 🗣️ instead of React nd Js

  • @davidstranava4057
    @davidstranava4057 Před 10 dny +108

    React is a problem

  • @ahmedrowaihi9804
    @ahmedrowaihi9804 Před 7 dny

    0:19 feels gay

  • @DryHub
    @DryHub Před 10 dny

    Love from Bangladesh ❤️❤️

  • @cristianosoleti489
    @cristianosoleti489 Před 10 dny +1

    Ta-da that's why React is inferior

  • @n6ra
    @n6ra Před 5 dny

    so irrelevant but i have a crush on u now

  • @thefilteredcoder
    @thefilteredcoder Před 10 dny +5

    Everyone whining about react. Just use something else. Oh wait, there isn’t a single job in svelte or whatever other libraries you prefer.

    • @statuschannel8572
      @statuschannel8572 Před 10 dny +5

      lol agree, why complaining about a release candidate? the whole purpose of them releasing the candidate is to get feedbacks like this!

    • @thefilteredcoder
      @thefilteredcoder Před 10 dny

      @@statuschannel8572 exactly. Honestly I think it’s great that we as a community have a voice and we can prevent stuff like this from coming out and they actually want to listen to us

    • @marcuss.abildskov7175
      @marcuss.abildskov7175 Před 10 dny +3

      Tell me you're a web developer without telling me you're a web developer.
      React is for people who don't know anything about software engineering

    • @edenassos
      @edenassos Před 10 dny

      @@marcuss.abildskov7175 React is for people who aren't broke, like you.

    • @statuschannel8572
      @statuschannel8572 Před 10 dny

      @@marcuss.abildskov7175 lol only from react 19 there is a compiler and it's magic. so by your logic everyone who uses a library or framework don't know anything about software engineering.
      Tell me you're a blind hater without telling me you're a blind hater moment!

  • @das_daily_
    @das_daily_ Před 2 dny

    React18+Next14

  • @pontusdorsay4673
    @pontusdorsay4673 Před 10 dny +3

    It's 2024, stop using react..

    • @SW-fh7he
      @SW-fh7he Před 10 dny +1

      Why? Doesn't make sense.

  • @atharv_uploads
    @atharv_uploads Před 8 dny

    Stop using react