Svelte 5 Surprised Me

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 179

  • @robolist2277
    @robolist2277 Рік тому +480

    we would be on mars by now if svelte was how the dom originally worked

    • @tedspens
      @tedspens Рік тому +5

      Totally Jetsons style! 🚀

    • @engageintellect
      @engageintellect Рік тому +4

      Can confirm.

    • @SzaboB33
      @SzaboB33 Рік тому +45

      This was exactly what I was thinking! We figured out that frontend code works better with a datadriven paradigm so we hack the whole functionality to make it work with virtual DOM or equal sign overload.
      HTML6 should maybe just make reactivity work by default.

    • @_rtdp_
      @_rtdp_ Рік тому

      😂😂😂 noice one...

    • @ossonku
      @ossonku Рік тому

      😅@@tedspens

  • @benkolya
    @benkolya Рік тому +147

    Can't help noticing the similarities to Vue 3, which is certainly not a bad thing

    • @jitxhere
      @jitxhere Рік тому +26

      Yea I too agree.
      Vue has a PhD in reactivity

    • @wobsoriano
      @wobsoriano Рік тому

      @@saadhabashneh5587 search "Vue Reactivity Transform"

    • @emartinez__
      @emartinez__ Рік тому +4

      Also composables

    • @djpunisha29
      @djpunisha29 Рік тому

      @@saadhabashneh5587 I think what the comment auther means is that the main similarity is $derived in Svelte can be seen as computed in Vue
      Also $effect can be seen as watchEffect in Vue ...

    • @ze_kel
      @ze_kel Рік тому

      ​@@saadhabashneh5587 ref() = $state(), computed() = $derived(), watchEffect() = $effect()

  • @jacoblockwood4034
    @jacoblockwood4034 Рік тому +57

    Definitely do a "playing with Svelte 5" vid

  • @jacoblockwood4034
    @jacoblockwood4034 Рік тому +60

    So excited to upgrade all my stupid sites to the new dope version lol

    • @isdeonf
      @isdeonf Рік тому +2

      You must be fun at parties

    • @jacoblockwood4034
      @jacoblockwood4034 Рік тому

      @@isdeonf Why? Because I left a comment on a UA-cam video? You just did the same thing... Besides I was being sarcastic

    • @Time2paw
      @Time2paw Рік тому

      "Besides you think you being sarcastic..."

  • @sahiltrivedi69
    @sahiltrivedi69 Рік тому +179

    “Svelte is becoming React” “Svelte is becoming Solid” “Svelte is becoming Vue”

    • @samifouad
      @samifouad Рік тому +101

      Svelte is actually just becoming a better version of Svelte

    • @cristianpallares7565
      @cristianpallares7565 Рік тому +10

      That means the signals paradigm is good 😁

    • @minnh2094
      @minnh2094 Рік тому +11

      I feel like Svelte lost its uniqueness. Not sure whether it is good

    • @daleryanaldover6545
      @daleryanaldover6545 Рік тому +3

      Not really, do you know where where SFC came from? It was from Svelte. Just like how Evan took the better parts of react to make Vue, he explored the possibility of SFC by Svelte with Vue and that is how compositions API was introduced, there was a huge drama about the moving away from options API to the new compositions API. If you read Vue 3 docs, it was also mentioned they explored compiler runtime but did not push through it because of how vue runtime is initially designed (around react's virtual dom of course).

    • @daleryanaldover6545
      @daleryanaldover6545 Рік тому +2

      ​@@minnh2094the top level reactivity has obvious limitations as mentioned on the blog post. Other frameworks took the best parts in svelte and kit to their own, SFC in Vue and Server context in Next. I think it is fair enough svelte team realised the current limitations when it comes to reactivity, they just simply copied what is the best practice at the moment. If there is a better way, I'm sure the svelte team would go for it without a doubt.

  • @dlongodesign7026
    @dlongodesign7026 Рік тому +21

    Yes please! ❤ More Svelte vids Theo!

  • @Fruitdev01
    @Fruitdev01 Рік тому +2

    It’s really incredible how you can read through and understand documentation so quickly and with such eloquence. As a Junior dev, I hope I can read docs as quickly as you & understand them like this someday 🤞

  • @al3030
    @al3030 Рік тому +5

    Yes, to more content about Svelte. Looks like it has a lot of traction these dayd

  • @oidualx
    @oidualx Рік тому +45

    I'm also hyped for Svelte 5, but I love Svelte 4 and I never got the argument that is not JavaScript, implying that React somehow just is. How can people claim that JSX "is" JavaScript is beyond me.
    In that example, what does it tell you that "count" is updated in the DOM? You are literally mutating its value! Not such a stretch of the imagination.

  • @djpunisha29
    @djpunisha29 Рік тому +9

    Similar to Vue $derived in Svelte can be seen as computed in Vue...
    Also $effect can be seen as watchEffect in Vue ...

  • @tedspens
    @tedspens Рік тому +16

    I was wondering what's Theo's thoughts on Svelte 5 and runes. Now I'm wondering what you'll do when you first get your hands on it. Yes, absolutely make a video, preferably as you first try it out. Personally, I'm kind of hyped.

  • @tanotive6182
    @tanotive6182 Рік тому +8

    Would love to see a video where you explore using runes in Svelte 5!

  • @nightshade427
    @nightshade427 Рік тому +22

    Svelte now looks like vue sfc

    • @daleryanaldover6545
      @daleryanaldover6545 Рік тому +5

      Vue initially copied SFC from Svelte. Svelte just saved their time and copied Vue reactivity instead since they already have SFC thing in the first place. And from what I know, Vue had a habit of copying the good parts of other frameworks, react's virtual dom is the first thing comes to mind. I think it's fair for Svelte also take a dip on the Vue's cake.

    • @OcielGonzalez_mx
      @OcielGonzalez_mx Рік тому

      sfc?

    • @samuelmorkbednarzkepler
      @samuelmorkbednarzkepler 3 місяці тому

      @@daleryanaldover6545 Vue didnt copy SFC from Svelte. Vue has always had SFC.

  • @LookRainy
    @LookRainy Рік тому +13

    this looks more like, not React, no Solid, but Vue

  • @stevewinner
    @stevewinner Рік тому +6

    Yes, do more videos on Svelte and trying things out with Svelte 5... We're switching a legacy site from backbone/marionette to Svelte and would I'd like to see your thoughts on it once you have a chance to try it out... anyways, keep up the good work and content :)

  • @lazyh0rse
    @lazyh0rse Рік тому +5

    Whoever is on the fence, you are missing out. I switched permanently from react to svelte and I don't regret it one bit.

  • @_ryaaan
    @_ryaaan Рік тому +2

    Would love to see more Svelte content out of curiosity

  • @snailedlt
    @snailedlt Рік тому +3

    Great video as always. Would be nice if you linked to the articles you're reading for easy access though

  • @Metruzanca
    @Metruzanca Рік тому +12

    Svelte 5 is cementing my belief in Solid's future being brightest. Runes are effectively signals. So not only is "svelte becoming react" but its also becoming Solid.
    EDIT: oh he says it too at 4:10 - dammit, why'd I comment before watching the video.

    • @waleedbinalim
      @waleedbinalim Рік тому +5

      I had the same feeling that this is highly similar to what SolidJS is achieving. Solid honestly deserves some more love and showcasing

  • @SzaboB33
    @SzaboB33 Рік тому +3

    I live the fact that Svelte 5 makes these features opt in because I will not use these.

  • @yourivanmill
    @yourivanmill Рік тому +8

    Soooooo Sevlte 5 is secretly Vue 3

    • @nooalovern
      @nooalovern Рік тому

      It's for us who don't like JSX or Virtual DOM a.k.a Solid and VUE.

  • @dermachedjamel8970
    @dermachedjamel8970 Рік тому +5

    I still don't understand the hype about svelte 5 when we already have Vue 3
    they look the same.

  • @gabrielcastilho4168
    @gabrielcastilho4168 Рік тому +3

    Yes, please more svelte content

  • @CrzyMan_Personal
    @CrzyMan_Personal Рік тому +6

    Svelte is basically ditching its soft magic system for a hard magic system

  • @bryanleebmy
    @bryanleebmy Рік тому +1

    We're SolidJS now!

  • @ZyncInteractive
    @ZyncInteractive Рік тому +16

    Svelte 5 looks a bit like Vue. $derived looks like computed, $effect looks like watchEffect. But overall looks great, going to give it a shot

    • @Anonymous-ib7dc
      @Anonymous-ib7dc 9 місяців тому

      Runes + stores for me felt even a bit nicer than vue piñata but still you are not far off

  • @alisherdotdev
    @alisherdotdev Рік тому +1

    3:57 Svelte becoming Vue actually

  • @Jeff-co.
    @Jeff-co. 7 місяців тому +1

    Svelte is amazing... was amazing. Just like Vue, Svelte had an original and unique idea of how to handle state and build pages. It was its own thing, different from Angular/React/Vue. But now, just like Vue 3, Svelte 5 is slowly changing into React. This thing about "$derived", "$state", "$effect", is all just React useMemo, useState, useEffect. Vue stopped being Vue on version 3, and so its originallity lasted 2 versions (up to Vue 2). Now Svelte's originallity would've lasted 4 versions, because version 5 just proved, yet again, that React has been right all along. Two amazing frameworks, Vue and Svelte, who started gorgeouslly doing their own thing and making devs around the world fall in love and have faith in modern JS, have now copied React and become what they were originally trying to defeat. What a sad time for all JS devs. I'll have to keep with Svelte 3/4, just like I've kept with Vue 2. Knockout was right all along. Svelte... was amazing.

  • @gummipo
    @gummipo Рік тому +2

    Would love to hear your take on ElectricSQL and the whole local-first idea.

  • @succatash
    @succatash Рік тому +1

    The hair looks good here. Great vid

  • @additionaddict5524
    @additionaddict5524 Рік тому +1

    Yes to Svelte 5 video but only if you eat a pizza pocket whilst doing so

  • @josephs1732
    @josephs1732 Рік тому +7

    Solidjs syntax doesn't even need a compiler for this exact thing to work. One can use solid signals like a library in any project. You should do more with solidjs since it's technically way more superior than svelte which is more hype than anything

  • @Voidstroyer
    @Voidstroyer Рік тому +6

    We might be witnessing the t3 stack migrating to svelte boys!!!

  • @mpiorowski
    @mpiorowski Рік тому +1

    More Svelte!

  • @JoyofCodeDev
    @JoyofCodeDev Рік тому

    🔥

  • @thomasmuller8266
    @thomasmuller8266 Рік тому +6

    Signals do not need magic, Runes are against the original idea of Svelte, it is a compiler. Solid is still the best piece of frontend framework engineering imo, it needs more adopters.

  • @ivanc3176
    @ivanc3176 Рік тому +3

    $ is fine. I always saw using JavaScript syntax to write JavaScript as positive of svelte.

    • @rafikkasmi1406
      @rafikkasmi1406 Рік тому +3

      exactlyyyyyyyy, i still cant understand the hype over svelte 5, like they just killed it's uniqueness by making it similar to other frameworks in the industry (react,vue,solid...), the simplicitiy of svelte was indeed its selling point , but now why would anyone choose svelte over the others ?

  • @dzienisz
    @dzienisz Рік тому +9

    Am I the only one who isn't excited about this? It's yet another new thing to dive into. While I have great respect for Rich Harris, for me, this feels like a framework where I'm not entirely sure what I'm doing.

  • @WillDelish
    @WillDelish Рік тому +2

    I enjoy svelte, but I also like jsx. Maybe I should try solid

  • @gro967
    @gro967 Рік тому

    So it's basically implementing all the good Vue principles :D

  • @freecollege6363
    @freecollege6363 Рік тому

    1:25 how is it that you can't see that when count updates the markup updates as well but in react you can?

  • @minnh2094
    @minnh2094 Рік тому +1

    I dont dislike the new Svelte, I just cant think of how different is Svelte compared with other frameworks now :/

  • @ISKLEMMI
    @ISKLEMMI Рік тому +2

    The Carniatoization of the JS ecosystem continues unabated and I'm here for it.

  • @syrix5914
    @syrix5914 Рік тому +1

    The get at 3:15 is confusing. Everything else looks way better than before!

    • @P4INKiller
      @P4INKiller Рік тому

      count is a primitive, so you have to create a get method to access the local variable.
      Otherwise you would be getting the same initial value, and not the mutated one.

  • @МаркЧолак
    @МаркЧолак Рік тому +1

    So Svelte's approach to describing reactivity actually turns into what Effector did 🤔

  • @yoanestradablanco1608
    @yoanestradablanco1608 Рік тому +4

    Sveltel Equal Vue3 :)

  • @yarrichar
    @yarrichar Рік тому +4

    Yes, more svelte please.

  • @Fanaro
    @Fanaro Рік тому

    Most JS frameworks are now finding out what the observer patter is?

  • @soumitripattnaik
    @soumitripattnaik Рік тому

    Vue 3 has all of this from years at this point and yet nobody talks about it anymore.

  • @vipero07
    @vipero07 7 місяців тому

    0:20 "I don't like when people change the syntax of javascript without really good reason."
    Yet you like JSX?

  • @yihad3255
    @yihad3255 Рік тому +3

    banger alert!!! time for me to take another look at svelte🙄

  • @sinasalahshour
    @sinasalahshour Рік тому +2

    it's sad that we lost surgical updates tho, now it feels like render function in react. but maybe there's a performance benefit..
    edit:
    surgical updates are kinda back (when you call function in your template)

  • @pedrohakia1
    @pedrohakia1 Рік тому

    WE LOVE YOU THEOOOOOO ❤❤❤❤

  • @brogotbonkers
    @brogotbonkers Рік тому

    definitely do a video playing with svelte 5

  • @Matyanson
    @Matyanson Рік тому

    2:19
    Please explain to me how changin the syntax of `let count = 0;` to `let count = $state(0);` suddenly makes it more tracable?
    It is still let, it is still in the same place.
    let is not a constant but variable and you should expect it to change...

    • @Matyanson
      @Matyanson Рік тому

      Obviously declaring a variable in a function would not be accessible since it is encapsulated in its scope

  • @pjc825
    @pjc825 Рік тому +1

    More Svelte/SvelteKit content please 💯❤🙏👍

  • @waytospergtherebro
    @waytospergtherebro Рік тому

    I want to look a lot worse than Weird Al Yankovic and make everyone who sees me uncomfortable.

  • @0xedb
    @0xedb Рік тому

    Not Theo tryna mimic Rich's voice😂

    • @t3dotgg
      @t3dotgg  Рік тому +2

      Not trying to mimic anything, guess I sound more like Rich at 7am 😅

  • @n4bb12
    @n4bb12 Рік тому

    Great improvements, those are exactly the things that have been bothering me.

  • @shreyanshsheth290
    @shreyanshsheth290 Рік тому

    Svelte is basically now react with jotai

  • @Valiant600
    @Valiant600 Рік тому

    So Svelte 5 and Vue 3 mostly resemble React but with different namings? Hooks are observables or runes?

    • @daleryanaldover6545
      @daleryanaldover6545 Рік тому

      Yeah, when Vue copied SFC from Svelte and Next copied Server context from Sveltekit, jus a few lines of code and we can merge these three frameworks together 😂

  • @Noritoshi-r8m
    @Noritoshi-r8m Рік тому

    Feels like VueJS in steroids, i like it

  • @MikeHTMLAllTheThings
    @MikeHTMLAllTheThings Рік тому +1

    T3 stack on Svelte 5 wen?

  • @dzisonline
    @dzisonline Рік тому +1

    That's "it's more like React" comment hurt me, mostly because it's true.

  • @lukasvainikevicius2463
    @lukasvainikevicius2463 Рік тому

    yes

  • @muslim8622
    @muslim8622 Рік тому +1

    Runes really looks like hooks, svelte 5 enable more clarity and code sharing
    The refactoring of svelte DX prove one thing, even if we come with a dozen of (fair) critiques on React, it was implemented with really good stuff especially the introduction of the hook in the framework, it was absolutly NUTS
    Encapsule the logic in a simple js function and use everywhere you need, it’s a very clever and useful feature
    Vue 3 implement a similar pattern with the composition API
    Even if we can do better, React stay a source of inspiration for the new frameworks

    • @dealloc
      @dealloc Рік тому +1

      They are effectively just signals. Difference is that signals inverses the control. With hooks, you subscribe to the lifecycle of a component, whereas with signals, the component subscribes to the signals.

  • @ChadcholMeesaeng
    @ChadcholMeesaeng Рік тому +4

    What's the point? What's fixing? Why change to be "reacty"?

    • @nowheremap
      @nowheremap Рік тому

      i like the amount of features that this makes obsolete: a simpler syntax and a less quirky implementation can make svelte even cleaner and more intuitive...
      you may call that reacty, but imo it only makes svelte more svelte, bc those were already some of svelte's strengths (and bc svelte is a word with an actual meaning)

  • @mikhalpalych
    @mikhalpalych Рік тому +13

    Everytime i look at things happening in svelte i have uncontrollabe urge to make a statement that vue3>svelte

    • @lucasjames8281
      @lucasjames8281 Рік тому +6

      Virtual dom

    • @cherloire7978
      @cherloire7978 Рік тому

      ​@@lucasjames8281 yet its surprisingly fast on benchmarks

    • @crab-cake
      @crab-cake Рік тому

      @@lucasjames8281 to be fair, vue is working on getting rid of their v-dom with what they call 'vapor'. that being said, i prefer svelte regardless.

    • @atanasantiev7237
      @atanasantiev7237 Рік тому

      vapor@@lucasjames8281

    • @berniko4954
      @berniko4954 Рік тому

      @@lucasjames8281Sheesh

  • @otnima
    @otnima Рік тому +1

    The problem is that adding all this as an additive feature means that all the previous behaviour is still there. This seems like a really strange choice to me, it'll make learning the language really confusing. Imagine trying to explain to a newcomer the difference between `let count = $state(0)` and `let count = 0` where `let count = 0` can be reactive but "it depends". I feel like they should've ditched the old behaviours all together.

  • @fakevc211
    @fakevc211 Рік тому +1

    Did Theo just hit puberty?

  • @jacksingermusic
    @jacksingermusic Рік тому

    Nice haircut, Theo!

  • @vcbiotech
    @vcbiotech Рік тому

    Do a video where you play with Svelte 5!!!

  • @funcmethod
    @funcmethod Рік тому

    More Svelte pls

  • @markzuckerbread1865
    @markzuckerbread1865 Рік тому

    anyone else notice how he combed his hair

  • @AndiRadyKurniawan
    @AndiRadyKurniawan Рік тому

    What's the point of using svelte if it just do the same thing as other framework does?

  • @naregtokatlian2869
    @naregtokatlian2869 Рік тому

    more svelte please

  • @levi2408
    @levi2408 Рік тому +4

    Would love to see more svelte content, seems like it's still an underloved framework

    • @sdwvit
      @sdwvit Рік тому +1

      It is a redundant framework lol that’s why no interest from the public

    • @PanosPitsi
      @PanosPitsi Рік тому +10

      @@sdwvitit’s literally just react with better syntax and like 10x faster.

    • @oscarljimenez5717
      @oscarljimenez5717 Рік тому

      usually template based frameworks have a hard time, because have too much magic and feel like lock-in in some way.

    • @cocoscacao6102
      @cocoscacao6102 Рік тому +3

      @@oscarljimenez5717 Template being "magic" while JSX being just JS is one of those horrible, hilarious and wrong statements. Both need to translate input to html, except JSX does it in a more ugly way.

  • @jengstrm2
    @jengstrm2 Рік тому +1

    Yeah. I never loved $ but yeah, the dumped everything sub-optimal 🎉

  • @EphYxRS
    @EphYxRS Рік тому

    Very nice mustache sir!

  • @eldarshamukhamedov4521
    @eldarshamukhamedov4521 Рік тому

    The move away from JS hijacking is huge.

  • @sadkebab
    @sadkebab Рік тому

    They are fixing the specific things that are holding me from actually adopting Svelte more often, very exited about Svelte 5.

  • @noxus_z
    @noxus_z Рік тому +1

    Literally vuejs

  • @tomfancode
    @tomfancode Рік тому

    Why we need sve when we have vue. Finally, I use Astro. Not next js, not nuxt js 😂

  • @robertshuxley
    @robertshuxley Рік тому +2

    i know it helps with the youtube algorithm but the thumbnails are getting out of hand

    • @minnow1337
      @minnow1337 Рік тому +1

      the clickbait stuff prevents me from watching ngl

    • @gamevidzist
      @gamevidzist Рік тому

      That's the most basic thumbnail you'll find in UA-cam land

    • @yestermonth
      @yestermonth Рік тому

      ​@@minnow1337Same, was forced to watch because there aren't enough Svelte Runes video yet

  • @thenewdesign
    @thenewdesign Рік тому +1

    Yeah bruh, React died in 2022. Long live Svelte

  • @hanes2
    @hanes2 Рік тому

    Svelte 5: Vue 3

  • @daleryanaldover6545
    @daleryanaldover6545 Рік тому

    When Vue copied SFC from Svelte and Next copied Server context from Sveltekit, jus a few lines of code and we can merge these three frameworks together 😂

  • @GamBar64
    @GamBar64 Рік тому +2

    I just hope it dosent move more towards React..
    I enjoyed writing let and knowing that Svelte will take care of it. It's not that hard to learn and follow imo

  • @JawsoneJason
    @JawsoneJason Рік тому

    Theo, you're not usually the best judge of things, so this feels on par.

  • @sir.richardpound
    @sir.richardpound Рік тому +2

    The update is awesome for svelte, but imagine writing your app around everything Svelte 5 introduces and then needing to switch front-end framework later down the line...

    • @JoeHartzell
      @JoeHartzell Рік тому +14

      Imagine writing everything in react then needing to switch front-end framework later down the line....

    • @sir.richardpound
      @sir.richardpound Рік тому

      @@JoeHartzell With svelte 5 what's the difference? Instead of the age of vendor lock-in, now it's framework lock-in

    • @exactzero
      @exactzero Рік тому +4

      @@sir.richardpound That's the point they were making. There's no difference, whether you use React or Svelte 5. So your original comment doesn't make sense.

    • @sir.richardpound
      @sir.richardpound Рік тому

      @@exactzero you want to be locked into a framework? That's nuts

    • @PanosPitsi
      @PanosPitsi Рік тому

      @@sir.richardpounddo you even know how to read?

  • @cooltune
    @cooltune Рік тому +4

    Geezus again with the $-signs. It's my php/ jquery days all over again. My shift-key is gonna get demolished. Just go Vue at this point my guys. And your components will resemble your ts-modules-code almost 1:1. No jsx, non of this $-sign nonsense. Just regular "import {this} from that" and then using reactive variables in your html-templates. That what its suppose to be. That it!

    • @DEVDerr
      @DEVDerr Рік тому +3

      Well... $ signs have a purpose here. They're "magic symbols" that tell compiler to do some compiler-specific tasks. So during compilation time, with $ sign they can easly split such an expression to:
      - what magic symbol was used
      - what was passed inside of it
      so that they can safely and easly apply some effect on what was inside

    • @danvilela
      @danvilela Рік тому

      Svelte 5 remove the need of importing stuff. Biggest win! You mash your shift key importing funcs way more than the dollar bill sign

    • @samuelmorkbednarzkepler
      @samuelmorkbednarzkepler Рік тому +3

      ​@@danvilelayou can do autoimports in Vue also. It even comes default in nuxt

  • @jawkx99
    @jawkx99 Рік тому

    OK I don't even care about the video, wtf is this hairstyle and moustache combo theo

  • @mrcode6123
    @mrcode6123 Рік тому

    what happened to your hairs

  • @SamualN
    @SamualN Рік тому +1

    these fake tweet thumbnails are very samey

  • @3sgtecelica
    @3sgtecelica Рік тому

    Damn it. Svelte waa so intuitive for me while is react is the complete opposite. Not looking forward to it being more React-like

  • @fabiancarrasco9841
    @fabiancarrasco9841 Рік тому

    As someone who does not like React. Svelte is not becoming react 🙂

  • @pokefreak2112
    @pokefreak2112 Рік тому +2

    How can people get excited by announcements like this?
    Dude is literally admitting he has no idea what he's doing and completely overhauled his framework because of it. Js frameworks are a massive liability and it's genuinely scary to see people blindly adopting them without even considering the maintenance cost for a second.

  • @heugh_jazz
    @heugh_jazz Рік тому

    Dude, shape up your moustache

  • @aarondunphy_
    @aarondunphy_ Рік тому

    No to Svelte content 😳😬

  • @robolist2277
    @robolist2277 Рік тому

    first

    • @tedspens
      @tedspens Рік тому

      You stole first without commenting on the video?