Svelte 5: Introducing Runes... with Rich Harris

แชร์
ฝัง

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

  • @immaterial_vivi
    @immaterial_vivi 9 หลายเดือนก่อน +87

    I liked the part where he said "It's svelting time!" and svelted all over the code base

  • @asatorftw
    @asatorftw 9 หลายเดือนก่อน +222

    The fact that I can now use reactivity in normal js/ts files alone is pure gold! YES!!!!

    • @kasper_573
      @kasper_573 9 หลายเดือนก่อน +10

      In what way are svelte files normal js/ts files?

    • @Karakatiza666
      @Karakatiza666 9 หลายเดือนก่อน +16

      @@kasper_573 runes can be used in js/ts

    • @kasper_573
      @kasper_573 9 หลายเดือนก่อน +10

      @@Karakatiza666 runes can be used in svelte files. Calling svelte normal js is just plain ignorant. It’s the same whitewashing bs as with ”react is just js” all over again. I think svelte is great Because it has extended js with great features. If I wanted to use normal js, guess what I would use? Normal js!

    • @boi8240
      @boi8240 9 หลายเดือนก่อน +22

      ​​@@kasper_573What... Svelte adds a compile step to ts and js that makes runes work. All it does is offer the convenience of Svelte's reactivity outside Svelte components. It just removes the distinction between svelte stores, ie: reactivity outside components, and in-component bindings, which have a whole different logic.

    • @nothappyz
      @nothappyz 9 หลายเดือนก่อน +5

      ​@@kasper_573 they are clearly talking about the compiled js

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

    At first I was extremely wary, and felt like it was ruining the entire purpose of Svelte. But the more I used it, the more I realized how much easier many things are, and the syntax remains minimal and elegant. Truly amazing work by the team.

  • @DavidMulderOne
    @DavidMulderOne 9 หลายเดือนก่อน +130

    It moves away from what svelte originally tried to do, because it turned out that it was impossible/harder than expected, and this totally seems like a step in the right direction 👍

  • @docmars
    @docmars 9 หลายเดือนก่อน +44

    Looking awesome!
    I can't help but to point out:
    Svelte React
    1. $state = useState
    2. $derived = useMemo
    3. $effect = useEffect
    4. $props = usual props destructuring at the function args level
    I think this will attract a lot more people from the React community and benefit from Svelte's other goodness!

    • @Viviko
      @Viviko 8 หลายเดือนก่อน +3

      Probably more on the lines of Solid, given it uses Signsls which Solid popularized.
      It can be argued that the choice of names is similar to React. But that’s honestly where the similarities end.

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

      I'm newish to all this and trying to make a bet on where front end dev might be in a few years.
      If svelte is becoming more Solid/Reactlike , why not just stick to Solid/React?

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

      @@ReddSpark Because then you don't get to use svelte

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

      @@ReddSpark Keep in mind that these runes are compiler macros, rather than functions, so they can do a lot more magic behind the scenes to keep your code minimally reactive and maximally fast.

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

      Derived looked more like useEffect to me. Changing a value when a variable changes. Correct me if wrong though 😊

  • @lintendo100
    @lintendo100 9 หลายเดือนก่อน +198

    Looks amazing! I really hope we'll get some proper official devtools with component inspector soon. That's the one thing I'm missing from Vue :)

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

      +

    • @MrVauxs
      @MrVauxs 9 หลายเดือนก่อน +1

      Doesn't the Vite Inspector do the job?

    • @TayTayChan
      @TayTayChan 9 หลายเดือนก่อน +3

      @@amirhosseinahmadi3706 The "old" behaviour hasn't actually changed, has it?

    • @VaelVictus
      @VaelVictus 9 หลายเดือนก่อน +3

      ​@@amirhosseinahmadi3706Rich directly said in the video that he wants to emphasize that things are not changing. Nothing was lost. They're only adding new.

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

      @@amirhosseinahmadi3706 how? isn't the goal of signals to enable fine grained reactivity?

  • @xbsidesx
    @xbsidesx 9 หลายเดือนก่อน +54

    Looks like you're helping people transition from React a lot smoother. I embrace the idea. The "rune" name is... well, it's fun and it helps remembering. All in all, big props for svelte. I hope I can use it in the near future in my paid job.

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

      If you are coming from React - SolidJS is a much better fit. Signals from the very beginning and flexibility of JSX.

    • @xbsidesx
      @xbsidesx 9 หลายเดือนก่อน +1

      @@MagicNumberArg Its ecosystem is not wide enough in my opinion. Also, I tried to work with a simple websocket once and it was really hard. Hopefully it's better now.

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

      @@xbsidesx Solid's ecosystem is very robust. The reason why it might seem smaller than React's at times is because a lot of things are already built into it. For example, you dont have a dozen state management libraries to choose from for SolidJS, but only because the optimal store solution is already built into it's core.

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

      @@MagicNumberArg I think he's comparing solid's eco system to svelte's tho

  • @sadramohh
    @sadramohh 9 หลายเดือนก่อน +9

    I really want to see Ryan Carniato's reaction to the new signals and runes

  • @ethanreker3333
    @ethanreker3333 9 หลายเดือนก่อน +5

    This is very exciting! Big thanks for all of the hard working devs who've made Svelte a reality! Several years ago when I first discovered Vue, I was blown away by how much simpler and flexible it was than other frameworks I had tried. It was my absolute favorite framework to work with and I evangelized it to every other dev I knew until... I found Sveltekit. I had the same feelings/experience towards it but maybe even stronger. I honestly cant imagine how it can get much more productive and clean that it already is, but it looks like your team is finding a way! Looking forward to the version 5!

  • @cstrnt
    @cstrnt 9 หลายเดือนก่อน +85

    Oh man, what a great job from the svelte team and also Rich is just a king at those videos. Short, informative and funny

  • @milesq
    @milesq 9 หลายเดือนก่อน +57

    It looks sooo similar to what we have in react/solid/vue. In the past years all of those frameworks have become so similar that it is hard to see some true differences in DX

    • @gimp3695
      @gimp3695 9 หลายเดือนก่อน +23

      Came here to say this. I’ve been a react developer for a long time and now it feels like I’m back in react. Need to digest if this is good or not.

    • @TunaCanGuzzler
      @TunaCanGuzzler 9 หลายเดือนก่อน +5

      You can choose to not use it. The problem with react is the shadow Dom, not the 'reactive' feature set

    • @pozz941
      @pozz941 9 หลายเดือนก่อน +16

      ​@@TunaCanGuzzlerThat is not entirely true, I think that to many the performance are not the main reason they are using svelte. My initial interest in svelte was born because looking at the code was like looking at what html, css and js should have been all along. I really liked the magic of svelte and I wish they found a syntax that better reflected that. Maybe something like "state variable = 0" instead of "let variable = $state(0)"

    • @milesq
      @milesq 9 หลายเดือนก่อน +5

      @@TunaCanGuzzler yeah, the same way I could choose to not use hooks and stay with react class components. So only theoretically

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

      I wonder if these "hooks" come with the same downside as react's one have (hook hell), svelte having a component instance scope, the context is completely different, the issue with hooks is that they often don't play well with non hook code, but they say avoid hooks if possible, so you end up never knowing how much hook to use, I hope svelte is not going in this direction@@gimp3695

  • @semicognitive
    @semicognitive 9 หลายเดือนก่อน +11

    Absolutely amazing. Loved being a part of this community for the past few years

  • @Huntabyte
    @Huntabyte 9 หลายเดือนก่อน +59

    Let's goooo!

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

      Hype!

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

      Excited to see what this means for Melt

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

      ​@@harryickeringill2948This is huge

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

      Time to make some new videos brah😅

  • @AmxCsifier
    @AmxCsifier 9 หลายเดือนก่อน +48

    Brilliant. It's what svelte needs exactly. You guys are just brilliant!

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

    I watched some videos about Svelte 5 runes in the past couple of days and came across some negative reviews about this new mechanism. Including myself, I was initially confused about what this new mechanism was primarily designed to solve. So far, many videos I've watched introduced runes using `Counter` as an example, but using `$state` in such a simple example like `Counter` seemed to complicate things unnecessarily.
    It wasn't until I watched Huntabyte's "Don't Sleep on Svelte 5" that I got a preliminary understanding of the benefits this new mechanism can bring. In my opinion, runes currently lack real-world examples to convince people to try them out, and I hope to see more practical demonstrations in the future that address real problems, especially how it can make compliated code simple, rather than just using `Counter` as an example.

  • @pjmq
    @pjmq 9 หลายเดือนก่อน +51

    I haven't had the "Aha I get it!" moment yet but I'm hoping I get there. It's giving me rather nasty React vibes though so it would have been excellent to have an apples to apples comparison of how and why it's different from React's useEffects etc etc. in other to quell that uneasiness that I'm sure many people are having right now.

    • @isdeonf
      @isdeonf 9 หลายเดือนก่อน +13

      It's normal to read "$state" and "$effect" and get memories from "useState" and "useEffect", but other than the word they share, they're nothing alike, not above the hood, not under the hood. And this new pattern enables Svelte to generate faster code, smaller bundle, reactivity in .js and .ts files... better derivated values than the problematic $:... it's a great tradeoff.

    • @WilsonSilva90
      @WilsonSilva90 9 หลายเดือนก่อน +9

      @@isdeonf Even if they are nothing alike, it expands the API of Svelte, making it more complicated. Simplicity is key and JavaScript libraries tend to grow in complexity until they are no longer useful. That's why they are always being rewritten and that's why there's a new JS library every other day.

    • @LongNguyen-dh3bm
      @LongNguyen-dh3bm 9 หลายเดือนก่อน +1

      @@WilsonSilva90 It is a bit more complicated than current Svelte, but everything should be more consistent, with reactive variables now represented by the same thing (runes), and uses the same syntax. Also speed is much faster due to the fine grained reactivity that it brings.

    • @crab-cake
      @crab-cake 9 หลายเดือนก่อน +3

      @@WilsonSilva90 it's really not that much more complicated though. i think it's actually more clear and now we can use svelte behavior outside of svelte files.

    • @derschutz4737
      @derschutz4737 9 หลายเดือนก่อน +5

      @@WilsonSilva90 it literally doesn't expand the api. the api is the same but just syntactically different. Instead of reactivity being an implicit property, it's explicit.

  • @dethcx22
    @dethcx22 9 หลายเดือนก่อน +14

    This was my biggest friction when trying out Svelte; Feels a lot more Vue like now with those primitives being available, and fixes the problem with reactivity outside of a component, excellent.!

  • @seijiphirao
    @seijiphirao 9 หลายเดือนก่อน +21

    Awesome! Seeing how these states patterns are starting to get implemented in various frameworks I would love to see someday a native solution similar to these runes, something like:
    let state counter = 0;
    let derived doubled = counter * 2;
    effect function(mouse) { last = mouse };

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

      Agreed, but if it's gonna be native there's no reason to keep "let" and "function":
      derived doubled = counter * 2;
      effect(mouse) { last = mouse };
      looks a bit weird now, but I think it would look better with syntax highlighting

    • @Rtzoor
      @Rtzoor 5 หลายเดือนก่อน +1

      @@JrgenKalsnesHagen look brilliant, i sure hope this will happen some day and we will be able to shed another layer of complexity from web apps

  • @chriss3404
    @chriss3404 9 หลายเดือนก่อน +5

    YES!!!!!! This is exactly what svelte needs. I love writing new Svelte components because its almost always simple and intuitive to wire up my state and be done with it, but when refactoring time comes for complex, Svelte-specific code, everything takes 2-3x longer than it should because of those exact issues. So exciting!

  • @sadramohh
    @sadramohh 9 หลายเดือนก่อน +18

    Svelte finally embracing signals brings a smile on my face :)
    Signals for the win!

  • @gamerzone8876
    @gamerzone8876 9 หลายเดือนก่อน +18

    Finally, Svelte is adopting signals. 🎉
    Those reactive statements gave me a hard time debugging

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

      Yeah, only took them 5 years...

  • @mormantu8561
    @mormantu8561 9 หลายเดือนก่อน +3

    Looks pretty great at first sight. Providing a more advanced reactivity model for those who need it based on signals. Which are, as others mentioned, also used in other frameworks. Seems like a really solid choice. Props to the developers!

  • @vitiok78
    @vitiok78 9 หลายเดือนก่อน +4

    So... This is Vue 3 now? Only compiled?

  • @LeonRadley
    @LeonRadley 9 หลายเดือนก่อน +30

    This is going to be epic!
    All the things I found a bit weird about svelte can now be written differently.
    and the mental model being signals means jumping between angular, solid, svelte is also going to be easier.
    🚀

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

      most of the use case don't require this addition and is simpler using svelte state, store are great, this addition shouldn't be overrated because you should still learn to work without for most of the cases.

  • @jakobsturm2438
    @jakobsturm2438 9 หลายเดือนก่อน +82

    Looks slightly overwhelming at first glance but I believe that these are the correct changes for the future of Svelte

    • @sherwinbangs
      @sherwinbangs 9 หลายเดือนก่อน +34

      I chose Svelte for simplicity but now it's starting to look like React and I'm terrified

    • @CottidaeSEA
      @CottidaeSEA 9 หลายเดือนก่อน +5

      @@sherwinbangs No dependency arrays present, so seems fine to me. I am concerned about using $effect for onMount functionality though. That does not at all seem healthy.

    • @ISKLEMMI
      @ISKLEMMI 9 หลายเดือนก่อน +7

      @@sherwinbangs It's looking more like SolidJS and (thankfully) not React.

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

      ​​@@sherwinbangsikr... just $: feels soo good

    • @kylerjohnson988
      @kylerjohnson988 9 หลายเดือนก่อน +1

      @@CottidaeSEA Why doesn't it seem healthy to you? Aren't life cycle functions like `onMount` essentially effects themselves?

  • @Manish___Choudhary
    @Manish___Choudhary 9 หลายเดือนก่อน +8

    It's my personal opinion, Runes just ruens the developer experience.
    I love only that Props rune.

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

      In small components yes
      But for bigger components and "hooks" it's will be much better

  • @DEVDerr
    @DEVDerr 9 หลายเดือนก่อน +24

    This video gives me strong React Hooks introduction vibes with this "rune" branding... which I'm not sure if I like. But if those "runes" will have even better DX (on top of already fantastic DX), then I will like it immediately.
    Hopefully the $effect() will not have the same pitfalls like useEffect() has

    • @gamerzone8876
      @gamerzone8876 9 หลายเดือนก่อน +5

      This effect is signal based, unlike React, which runs after render.

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

      No, it good old signals
      If fact only react don't use this patter now days from bigger players (vue, angular, solid, qwik, preact)
      And I'm sure you will love it!

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

      Vue doesn't use signals@@untlsn

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

      It’s optional! But still, way better than reacts version

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

      The effect will have the same pitfalls if you are not careful and try to set a value inside the effect which at the same time is also used in the same effect.

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

    Was on the fence about using svelte for a new project, but now I'm definitely gonna do it!! Thanks for all the hard work Rich!

  • @brandonculver8911
    @brandonculver8911 9 หลายเดือนก่อน +7

    The first 3 minutes of this video is ironically the single most concise argument against Svelte I have ever seen. Runes look a lot better, but it also smells a lot more like Solid and React now tbh. Feels a little shark jumpy.

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

    Beautiful, beautiful. Great work. Thank you, Rich!

  • @user-sv5gt1lo3b
    @user-sv5gt1lo3b 3 หลายเดือนก่อน +1

    As someone just learning Svelte, I'm pretty excited to see the props rune usege here. I always found it weird to wrap my head around the 'export' statement within a child component, when in my head it felt like it should have been an 'import' statement.

  • @bauxite13
    @bauxite13 9 หลายเดือนก่อน +1

    Playing around with it, I'm really glad that using runes in a separate file and then importing it does NOT turn the whole component into rune-mode, which is really nice!

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

    This looks like some great improvements. Well done to all involved!

  • @tedspens
    @tedspens 9 หลายเดือนก่อน +1

    Thank you and the Svelte team for making web development awesome. Looking forward to 5 and Runes! 👍

  • @seabass_1
    @seabass_1 9 หลายเดือนก่อน +4

    You once again solved problems before i experienced them. Ill thank u in a couple weeks once this sinks in!!

  • @PierreLebrunAnthony
    @PierreLebrunAnthony 9 หลายเดือนก่อน +1

    Nice! As a daily Vue user this feels very comfortable - similar functionality to the composition API (I especially like how computed/derived values are made explicit with a special keyword) but better ergonomics enabled by the compile time approach.

  • @jengstrm2
    @jengstrm2 9 หลายเดือนก่อน +12

    Congratulations to Rich, the team, and all the BelieVers🎉it’s great to see the framework simplify the complexity around rendering modern UI. It seems like a real step forward.

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

    Can't wait to get my hands on Svelte 5! Bravo Rich and Svelte team! Great job! Thanks.

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

    Awesome! Much more intuitive way to create and reuse pieces of logic for different components.

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

    I can't explain how excited this makes me, never thought code could make me feel this way 😊
    Ty Mr.Harris!

  • @HeatingUpDuke
    @HeatingUpDuke 9 หลายเดือนก่อน +1

    Not gonna lie, 5:41 was exactly my reaction at first but thinking about it I think it's the right decision. Can't wait to try it at home. Congrats to the team for the awesome work as always!

  • @mendodev8775
    @mendodev8775 9 หลายเดือนก่อน +27

    I'm really happy about the new `$props` rune. The current way of exposing props was not intuitive to forward implicit props with type safety (like all the html attributes for a simple button).
    Congrats to the whole team, looking forward to try this out! It looks great 🔥

    • @Pavel-wj7gy
      @Pavel-wj7gy 9 หลายเดือนก่อน +1

      I'm still waiting for the $LayoutEffect rune too

    • @Dev-Siri
      @Dev-Siri 9 หลายเดือนก่อน

      I agree. before I had like so many complicated hacks, type assertions and rest operations just to make a customizable button, but now it looks like it is more like React which I think is honestly for the better. I think the way JSX frameworks like React handle props with an object, are better for reusable UI components like buttons because you can destructure what you want, and spread the rest. Currently, in one of my Svelte UI components, there are so many hacks I did just to get type-safe props and use some custom props the way I want to.

    • @MrBlackhen
      @MrBlackhen 9 หลายเดือนก่อน +1

      the current way is just `export let count: number` and it's type safety?

  • @peepeepoo3432
    @peepeepoo3432 9 หลายเดือนก่อน +17

    I'm so happy about $props. Also I would like to point out that you talked about the performance problems in #each blocks but you don't show how the runes model fixes it. I assume Svelte 5 will use fine-grained reactivity a-la Solid, but at least mentioning it would have been nice.

    • @daviidon
      @daviidon 9 หลายเดือนก่อน +9

      It's using signals. He showed it in the generated output.

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

      Like Steve Jobs, he is marketing genius 😂

  • @davidsiewert8649
    @davidsiewert8649 9 หลายเดือนก่อน +1

    Hurray, finally we have react hooks in svelte!
    People, rejoice!

  • @artneo7
    @artneo7 9 หลายเดือนก่อน +4

    Svelte is the best, great news for the community! 😄

  • @JViz
    @JViz 9 หลายเดือนก่อน +1

    It looks like you're replacing the "special" code and syntax with monads. This definitely feels like a good direction. Thank you for the update and I look forward to using the improvements.

  • @vutruong4164
    @vutruong4164 9 หลายเดือนก่อน +28

    Holy cow! So Svelte is also joining the Signal party after Solid, Qwik and Angular made Signal their state management and reactivity primitive.
    At this point, Signal should just be included as a Javascript primitive already.
    And the creator of Signal should receive a Nobel Peace prize for making all the frontend frameworks AGREE on a common state mgmt and reactivity model

    • @Psy45Kai
      @Psy45Kai 9 หลายเดือนก่อน +3

      *caugh * Qt *cough *

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

      Bless you, that was a loud one!

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

    Absolutely love Svelte, and SvelteKit.
    Keep it up Rich and the team!

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

    $props to you and the Svelte team for this fantastic update 👏

  • @CottidaeSEA
    @CottidaeSEA 9 หลายเดือนก่อน +4

    I am slightly concerned about $effect being used as onMount behavior. Exactly how does that work?

    • @xazzzi
      @xazzzi 9 หลายเดือนก่อน +1

      Also concerned about it, onMount runs once, effects - whenever deps change, not the same.

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

      @@xazzzi Yeah, it's dangerous since it all depends on what happens inside of the effect. Since onMount isn't going anywhere, using it is not really a problem, but I've used React enough to know that the reliance on useEffect is detrimental. You can't avoid side-effects, but being able to better control when and why things happen is incredibly important and React only recently added an experimental feature for that purpose.
      In the case of React, the issue is moreso the fact that they have a dependency array though.

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

    Also can’t wait to learn more about the speed improvements too. 🚀 Excited for the future.

  • @iamnoone3588
    @iamnoone3588 9 หลายเดือนก่อน +18

    this update is giving me react vibes but weirdly enough i kinda like it 🤣

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

    Great additions to this wonderful toolkit!

  • @_fayeznazzal
    @_fayeznazzal 9 หลายเดือนก่อน +1

    Amazing! I think Runes will have great impact on Svelte the same way hooks impacted React, it helps people learn those tools way easier.

  • @Sefriol
    @Sefriol 9 หลายเดือนก่อน +1

    I think these were the primary gripes why I preferred Vue over Svelte. Especially the mind games that you had to play when dealing with Svelte vs TS/JS files.
    I hope to try Svelte 5 in my next project soon!

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

    This looks great! Well done, everyone! ❤

  • @chadelliott7629
    @chadelliott7629 9 หลายเดือนก่อน +21

    For me, Svelte was 100% about the magic that the compiler does behind the scenes. Needing to be explicit about reactivity ruins that. Keep Runes as a power-user feature for complex projects, but save the joy and simplicity by continuing to support the simpler syntax that made Svelte so wonderful.

    • @geeksy2278
      @geeksy2278 9 หลายเดือนก่อน +5

      This is true for small apps. For larger apps this is pure gold

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

      The simpler one will be deprecated sadly

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

      Maybe. But it's only a tiny bit of extra syntax, which helpfully highlights where the magic is happening.

  • @xazzzi
    @xazzzi 9 หลายเดือนก่อน +4

    1. What if derive does not hit dependencies .get? Ex: it's under if branch.
    2. How do i ignore some dependencies that shoud not trigger recalc? I used $: fn() with explicit dependencies often for this exact purpose.
    3. Does it mean svelte compiler should now run in all files to detect/compile runes?
    It looks like mobx tbh.

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

    Amazing! Keep the great work guys!!!

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

    'Good luck catching us now' 😂

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

    THank you for providing me with this tool so I can create high end websites.!

  • @sadkebab
    @sadkebab 9 หลายเดือนก่อน +4

    This fixes most of the issues I had with adopting Svelte on a larger scale in my projects. I really can't wait for Svelte 5 to come out.

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

    SolidJS for Svelte, nice! 😄

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

    Fantastic work!

  • @aldanasjuan
    @aldanasjuan 9 หลายเดือนก่อน +3

    I've fixed the first problem by passing the variables to the $: statement, like so: $: doubled = doubleCount(count){...}, the compiler reruns that statement and function when count changes, no store needed and the function remains simple. You can even ignore the arguments passed into the function if all you need is to rerun the function when that 'count' changes.
    That being said, I love the idea of not losing sync with other functions and being able to use runes in .js modules.
    All the other stuff looks like sugar too.

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

    It look interesting because what makes Svelte enticing is what's under the hood (compiler etc.) The Rune syntax looks closer to React, which might help people to try out Svelte!

    • @shrin210
      @shrin210 9 หลายเดือนก่อน +1

      Nope, React crowd will choose Solidjs just bcoz of JSX 😂
      I think Svelte got even more cluttered with derived and effect.

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

    This feels like it's getting closer to react...
    Thanks for making svelte, I love using it!

  • @dellaian
    @dellaian 9 หลายเดือนก่อน +4

    Well done. My state machines will benefit from these changes

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

    Thank you, thank you, thank you! ❤❤❤ This looks so promising and exciting! :)

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

    Awesome! Great work! 🚀

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

    This has Vue 3 vibes, and im all here for it.

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

    This is awesome dude!

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

    Oh yes! Building complex custom stores for responsive modules isn't fun, this change looks so much better!
    Can't wait for the release.

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

    I love it, svelte 5 makes svelte features elegant

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

    Hold on, it only took me a few hours to feel comfortable with Svelte and now it's going to be even easier... sign me up! Also, calling them runes is just amazing. Cheers, Rich!

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

    Awesome! can't wait to use it

  • @coffee-is-power
    @coffee-is-power 9 หลายเดือนก่อน

    This changes... EVERYTHING! I've written a lot of spaghetti code in svelte because there was no way to do better, but this will significantly improve the way i write and design code in svelte.

  • @abdelrahmankhalil
    @abdelrahmankhalil 9 หลายเดือนก่อน +1

    This is exactly what I've been waiting for / want

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

    Looks like Cleanup. Love it!

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

    This is extremely exciting! It's been the biggest pain point for me, glad that it's being addressed!

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

    Big W man, I kinda prefer this new syntax.
    syntax of Runes is more similar to React and VueJs features which means those devs can learn svelte and migrate to it more easily and I like that they used signal mechanism for reactive states.

  • @andrewcraswell4117
    @andrewcraswell4117 9 หลายเดือนก่อน +1

    The cutaway to Planet of the Apes was the laugh I needed this week xD
    I'm also loving this change. Less magic, more explicit. This will be easier to learn and grok for both novices and experienced devs alike.

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

    Gosh this is amazing😍

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

    At first glance, I was a bit worried of syntax changes. But then I saw that this is better choice for the future of Svelte. Both in terms of easier adoption and scalability of the apps.

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

    Amazing!Nice Work!!!!

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

    I am now adopting svelte strictly for the wizard vibes. I already build all my tools with magic related names, so this is perfect.

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

    Good job, great changes

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

    looks awesome, but questioning about using state rune, looks like we won't be allowed to use more then once at the component?
    I fill I'm wrong but it is as fire as it for now

  • @JoyofCodeDev
    @JoyofCodeDev 9 หลายเดือนก่อน +5

    🔥

  • @b1ting375
    @b1ting375 9 หลายเดือนก่อน +3

    dev: shows you a beautiful, awe-inspiring new world
    also dev: you can't install it yet. we don't have a release date.

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

    so exciting!

  • @ivanjermakov
    @ivanjermakov 9 หลายเดือนก่อน +1

    This is why I love SolidJS.

  • @pevey
    @pevey 9 หลายเดือนก่อน +7

    Rich: "We svelted all over your code base."

    • @seabass_1
      @seabass_1 9 หลายเดือนก่อน +1

      "Counterexample...counter example (two words)"

  • @X85283
    @X85283 9 หลายเดือนก่อน +1

    Rich Harris and I have the same folding table? WOW.
    Honored.

  • @hamm8934
    @hamm8934 9 หลายเดือนก่อน +3

    Looks like I was right for sticking with Vue lol.

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

    This is fantastic! I'm so excited to use these features. Amazing work by the dev team. Holy crap...
    I'd like clarity on under what conditions the $effect triggers though. Is it the same as $: { ... } blocks where all referenced symbols are tracked? Does this happen recursively through other function calls in order to traverse things like `createCounter()`? Another commenter mentioned how this would let them get reactivity from even external js/ts files, so I'd like clarity on how the symbol tracking / evaluating all works. That's the most confusing tidbit. Other than that, it looks WAY simpler than the old model. Bravo!

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

    Rich, you told us that Excel sheets were great and they don't go out of sync... Svelte does, it needs to be fixed, not replaced.

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

    Awesome!

  • @Dev-Siri
    @Dev-Siri 9 หลายเดือนก่อน +4

    never have I been so excited for a JavaScript framework before.

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

      🤢

    • @Dev-Siri
      @Dev-Siri 9 หลายเดือนก่อน

      ​@@shrin210 what's there to be disgusted about?

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

      @@Dev-Siri Javascript framework itself, even svelte couldn't get it right in first try with all the past experience of other framework.
      And cluttered even more with derived and effect.

    • @Dev-Siri
      @Dev-Siri 9 หลายเดือนก่อน

      ​@@shrin210 I see nothing wrong with that. The old reactivity model will probably get deprecated and removed in future versions of Svelte just like how React is close to removing class components. but for now, I think its pretty solid. it gives us time to migrate which is simpler than ever and the new APIs make more sense in my opinion instead of implicitly guessing that _this variable is state and this is normal_

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

      @@Dev-Siri Reactjs doesn't have class components for 3 years now I think.
      Aahhh ha, old reactivity model is useless that's how Reactjs introduced new features and everything is deprecated now. Now, Under 1 year after Sveltekit creation and usage, already features are getting deprecated, beating record of React Class with hooks 😂
      Hopefully, people didn't shipped any projects in old svelte. AND this should not be NORMAL.

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

    When can we use it? And will it come to SvelteKit? 😊