Svelte 5 signals fix its glitchy and inconsistent reactivity

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 22

  • @Icemourne_
    @Icemourne_ หลายเดือนก่อน +6

    And somehow svelte 3/4 reactivity is still better than reacts and easier to reason about

    • @webdevladder
      @webdevladder  หลายเดือนก่อน +2

      I agree in the simplest cases, but not beyond them, and that's where most difficulty and bugs appear.

    • @Icemourne_
      @Icemourne_ หลายเดือนก่อน

      ​@@webdevladder I have worked with complex states in both Svelte and React.
      And can't say React's reactivity was easy to work with ever people hate useEffect for a reason after all.
      Even with Sveltes reactivity quirks I never found my self debuging as much as I did in React land.

    • @ivan.jeremic
      @ivan.jeremic หลายเดือนก่อน

      React reactivity is hard! And compared to svelte 3/4 at least correct ans consistent which is mote i😂

  • @dand4485
    @dand4485 2 หลายเดือนก่อน

    I went from angular (hated it but was v2 then 4), then did React wow what a huge improvement, just didn't like what seemed to be like component slides more from needing to deal with context... Then found Svelte 3, and absolutely loved it, felt simple, direct and just right... Stepped away from Svelete for a bit to focus on work, getting back into Svelte i'm going from 3 to 5. Did a bit of a detour looking at Solid JS. But back to Svelte 5. My only question might be what else was missed. But that said, might feel like enough svelte has been written by enough people most if not all the edge cases have been caught an dealt with now... To their credit sure seem the Svelte team did a great job maintaining compatibility from what i see and only changed stuff that had to in order to fix bad side effects/behaviors...

  • @accountwizardindia8171
    @accountwizardindia8171 3 หลายเดือนก่อน +2

    Very insightful... 👍

  • @mikejohneviota9293
    @mikejohneviota9293 3 หลายเดือนก่อน +4

    svelte is the future

  • @SilverTongueFox
    @SilverTongueFox หลายเดือนก่อน

    Thanks!!

  • @f1945
    @f1945 2 หลายเดือนก่อน +2

    I don't complain about the changes but I would love to have a better syntax sugar that hides this complexity from the user. If you have a compilation step why not use it?

    • @chrikke
      @chrikke 2 หลายเดือนก่อน

      What "complexity"?

    • @ivan.jeremic
      @ivan.jeremic 2 หลายเดือนก่อน +1

      learn to code

    • @f1945
      @f1945 2 หลายเดือนก่อน +2

      @@ivan.jeremic if everybody thinks like you we were still coding in assembly.

  • @Z4KIUS
    @Z4KIUS หลายเดือนก่อน

    there was one weird situation where I just couldn't make it reactive, finally I've put awaited 1ms timeout in and... it worked
    but that clearly shouldn't be like that, I wonder if runes will fix that

    • @webdevladder
      @webdevladder  หลายเดือนก่อน

      interesting yeah my guess would be yes, runes are synchronously consistent so you shouldn't need timeouts to see reactive updates - I'd be happy to look at a REPL if you want

    • @Z4KIUS
      @Z4KIUS หลายเดือนก่อน

      @@webdevladder I basically finished updating my project, there's only that timeout left, I'll remove it and see what happens
      there's a big chance I just did something wrong, I'm a backend dev creating imperative code basically half my life so the reactivity is still like a black magic for me, but there are times when you have to use unfamiliar tools to get things done, Svelte(Kit) looked much less intimidating than React, Angular or Vue, and as I needed some JS libs on the backend and some SPA-ish action on the frontend Laravel with Livewire wouldn't work that nicely
      overall I'm pretty happy with the experience, both of Svelte 4 and 5

  • @greendsnow
    @greendsnow 2 หลายเดือนก่อน

    hopefully react will use a compiler and we're not going to have to deal with the poor svelte ecosystem just for the sake of performance.

    • @adreto2978
      @adreto2978 2 หลายเดือนก่อน

      Just write better React code

    • @erickmoya1401
      @erickmoya1401 2 หลายเดือนก่อน +8

      What poor ecosystem? You mean you are mad you didnt spend 3 hours choosing a state manager because it is built in?

    • @hasibuzzamantonmoy8845
      @hasibuzzamantonmoy8845 หลายเดือนก่อน

      "Poor ecosystem", lol. Pretty much any vanilla JS NPM package works out of the box with Svelte. You don't need Svelte wrappers to make it work.

    • @wentallout
      @wentallout 22 วันที่ผ่านมา

      svelte uses JS ecosystem lmao.