Svelte 5 Ruined Svelte (and that's why I love it)

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 85

  • @docmars
    @docmars Месяц назад +6

    The documentation was probably my biggest gripe about Svelte 3 when I tried using it last. Nice to see improvements and consolidation there!

  • @precisionchoker
    @precisionchoker Месяц назад +54

    This setup is too similar to Theo's (I love it btw)

  • @user-eg4qz9yc7e
    @user-eg4qz9yc7e Месяц назад +11

    I prefer one component in one file for naming conventions for the file

    • @13bjwarner
      @13bjwarner Месяц назад +1

      Me too but there are certain scenarios where snippets are nice

  • @nullzeon
    @nullzeon Месяц назад +2

    I personally think snippets are a great solution to multiple components in a file, if you want more than that then you just want React

  • @tobychidi
    @tobychidi Месяц назад +6

    This is more like Vue now. Nice.
    In Vue though there are more options to create multiple components in one file. Like Render functions, Jsx, or createReusableTemplate from Vueuse (which I prefer). 😊

    • @zayne-sarutobi
      @zayne-sarutobi Месяц назад +1

      Look who I found here😂😂😂

    • @tobychidi
      @tobychidi Месяц назад +2

      @@zayne-sarutobi 👋🏾😅

  • @__-se3tf
    @__-se3tf Месяц назад +9

    my question is what would multiple components in a single file even look like? Svelte markdown is already at the "top-level" of the document, so would it now have to be nested?

    • @okage_
      @okage_ Месяц назад

      {#component} or something maybe

    • @IvanKleshnin
      @IvanKleshnin Месяц назад

      Just a separating line like in the "Front Matter" format? It can be assigned a special meaning given that few HTML-s out there have a bunch of dashes aligned to the start of the line...

  • @trietang2304
    @trietang2304 Месяц назад +2

    Would be so funny if Theo in your video and you in Theo video

  • @stvn-light
    @stvn-light 28 дней назад +1

    can you make a tutorial for svelte 5 and how to use it in sveltekit

  • @raph151515
    @raph151515 Месяц назад +4

    why did you compare a standard writable with a custom rune state ? Compare the rune with a custom writable

  • @anksvans
    @anksvans 26 дней назад

    where can I get your vscode settings? looks damn pretty

  • @raph151515
    @raph151515 Месяц назад +2

    even if using detached jsx fragment everywhere in react feels good, it doesn't mean it's good. Often, innate reflexes push you towards anti-patterns. Multiple component per file and tons of fragment dangling are messy, harder to maintain and read

    • @pookiepats
      @pookiepats Месяц назад

      Says you, freelancers love it

    • @zayne-sarutobi
      @zayne-sarutobi Месяц назад +1

      Sweeping statement, definitely false

  • @Mixesha001
    @Mixesha001 Месяц назад +6

    Deja Vu

  • @j14wei
    @j14wei Месяц назад +2

    what vscode theme are you using? looks different from your latest vscode setup video

  • @alexandrefossatifilho558
    @alexandrefossatifilho558 24 дня назад

    Svelte single component per file is super clean, multiple components would only makes the files bigger and harder to read.

  • @WBSummerlin
    @WBSummerlin Месяц назад

    Great video def checking out Svelte 5! Stoked for Vue-ish stuff that just wrings out simplicity. Aside: are you aware of any mobile/hybrid options using Svelte? Research has turned up mixed results

  • @StephenRayner
    @StephenRayner Месяц назад

    The snippets thing you can do that in react too. You would make a function and then use the function in both places {render()}

  • @HoussamElbadissi
    @HoussamElbadissi Месяц назад

    Yeah they said they'll be removing the legacy mode in Svelte 6 in the release candidate announcement IIRC.

  • @Kmps2341af
    @Kmps2341af Месяц назад +2

    Thanks a ton for the video....can you please name an updated ui library for svelte5

    • @bmdavis419
      @bmdavis419  Месяц назад +2

      For now they don't actually need to be! Svelte 5 is fully backwards compat so u can upgrade slowly

    • @Kmps2341af
      @Kmps2341af Месяц назад

      @@bmdavis419 Thanks that helps..

  • @coolemur976
    @coolemur976 Месяц назад +1

    Multiple components in one file enables developers to do stupid stuff. Let's not allow it. 😱

    • @oeaoo
      @oeaoo Месяц назад

      They did, do and would any way and day.

  • @nonefvnfvnjnjnjevjenjvonej3384
    @nonefvnfvnjnjnjevjenjvonej3384 Месяц назад +2

    God the code at 8:51 made my eyes bleed. How are javascript devs ok with this? Do they not see the problem that this is all unneeded complexity?

    • @sorvex9
      @sorvex9 27 дней назад +1

      They are used to it

  • @ANCHANNEAN
    @ANCHANNEAN Месяц назад

    $effect is complained when using with async

  • @damnnn.
    @damnnn. Месяц назад

    i was happy with Svelte 4, but i'm also happy with Svelte 5. if we put aside the large ecosystem and more job opportunities it's still much better than React. Choosing over Vue 3 etc. is just a personal taste. Nothing new. We need more impressive innovations for future versions.

  • @ba8e
    @ba8e Месяц назад

    They definitely fucked it up. I will stick to the versions before the deprecations.

  • @paulcalebayibaemiotokolo
    @paulcalebayibaemiotokolo Месяц назад +6

    Guess I'll just go back to react. It was nice while it lasted, we all enjoyed the old svelte because of the syntax & simplicity...it's hard to go from that(the old svelte) to this...the simplicity of svelte was what made us all love it & chose it over react & the others

    • @DanteMishima
      @DanteMishima Месяц назад

      I'm of the same sentiment... I however won't be going to react either

    • @Hugos68
      @Hugos68 Месяц назад +4

      You clearly haven't tried svelte 5 yet. Everyone that has tried svelte 5 went in with a lot of bitterness and came out happier. You don't know what you're missing, but be my guest and go to react again. Can't wait to see you manually tracking dependencies and debug rerendering performance issues 😄.

    • @franklinsecretario3862
      @franklinsecretario3862 Месяц назад +1

      @@Hugos68 I'm about to start to use svelte on my side projects. do you have any tips or recommendation to het through it? or make my experience somehow fun?

    • @Hugos68
      @Hugos68 Месяц назад

      @@franklinsecretario3862 Go through the svelte tutorial!

  • @erickmoya1401
    @erickmoya1401 Месяц назад

    Multiple components in one file is hell.
    I know people think is better. Its not.
    Sometimes the restrictions makes you better.
    Snippets are just the thing we need, because it makes componentes more readable.

  • @Qrzychu92
    @Qrzychu92 Месяц назад +2

    Is it just me, or does this look like VueJS composition API from 5 years ago? :D

    • @hamm8934
      @hamm8934 Месяц назад +2

      Always has been. Svelte is just a Vue knock off without job listings lol

    • @pookiepats
      @pookiepats Месяц назад +1

      @@hamm8934hell yea brotha, with a worse ecosystem and jankier API 😂

    • @nuttbaked
      @nuttbaked Месяц назад +1

      holy shit the vue fanboys are insufferable. Imagine bringing down other frameworks just to gas your own. It's not that deep 😂

    • @nuttbaked
      @nuttbaked Месяц назад +1

      ​@@hamm8934ok

    • @nuttbaked
      @nuttbaked Месяц назад +1

      ​@@pookiepats"worse ecosystem" its literally a javascript ecosystem...
      "jankier api" yeah this guy doesn't read the docs

  • @ktoxcon
    @ktoxcon Месяц назад +1

    Same thing as React just different buzz names. I'm not surprised everyone keeps choosing React.
    First hooks, then "composables" and now "runes". Things are not evolving.

    • @jesper.ordrup
      @jesper.ordrup Месяц назад

      Its a common first observation. Looking at it there are similarities. Hands on shows you the difference. Your conclusion seems wrong. But hey go go go react

    • @user-eg4qz9yc7e
      @user-eg4qz9yc7e Месяц назад +1

      Except performance. React is slow

  • @XRENDERMAN
    @XRENDERMAN Месяц назад +1

    Why would you want more than one component in a file? How would you and other people navigate this codebase when you no longer know where to look for it?

    • @pookiepats
      @pookiepats Месяц назад

      React exist and does this, foolish question. Obviously it is viable

    • @XRENDERMAN
      @XRENDERMAN Месяц назад +1

      @@pookiepats react existence is foolish in itself.

    • @hamm8934
      @hamm8934 Месяц назад +2

      it can be useful when you have a part of a component that you just want to abstract out, like say a list item, but it isn't worth creating an entirely new component file because you're not doing much in terms of logic, just templating.

    • @pookiepats
      @pookiepats Месяц назад

      @@XRENDERMAN it’s foolish to spend so much energy caring should how html gets generated

    • @XRENDERMAN
      @XRENDERMAN Месяц назад

      @@pookiepats I don't care how it's generated, but I do care about verbosity, code base size, mental load etc, etc. Basically, it is about future velocity and ease of supporting the code base. React is the worst thing ever created in that regard that happened to become popular. It just slows your dev process to a halt, unnecessarily complicates things and forces you to write tonnes of boilerplate code. I don't think that ANY step in that direction should be applauded.

  • @ZayebistyMariusz
    @ZayebistyMariusz Месяц назад

    I've barely started learning and I've just stopped enjoying it :(

  • @AScribblingTurtle
    @AScribblingTurtle Месяц назад +1

    I wished, they would be more clear with the "Stores". Purely seen from Svelte 5, they are gone.
    However, to not break backwards compatibility, their functionality still exists.
    The new Method isn't exactly "Stores". It's just State-Vars wrapped in different Scopes.
    I'm a bit torn on that one.
    On one the positive side, anyone can now define themselfs how their "Store" should work.
    On the negative side, anyone can now define themselfs how their "Store" should work. So 10 different people, means 10 different ways for a "Store" to work.

  • @Danielo515
    @Danielo515 Месяц назад

    Here is an advise so you don't depend on framework author decisions: decouple your view from your logic. You're welcome

  • @StephanHoyer
    @StephanHoyer Месяц назад

    Wake up!

  • @designerjehovah4453
    @designerjehovah4453 Месяц назад +1

    IMHO nothing beats React at making things easy to reason about. I would put Vue in second!!

  • @蝴蝶先生-m4j
    @蝴蝶先生-m4j Месяц назад

    so why not use react now?

  • @i3looi2
    @i3looi2 25 дней назад

    That;s all !? That's all the good parts of svelte 5? Wow. Clearly not someone who followed svelte since Svelte 1.
    Clueless.

  • @hamm8934
    @hamm8934 Месяц назад +9

    Just use Vue lol. Its the second largest ecosystem and is 95% the same exact API.

    • @AtomicChristmas
      @AtomicChristmas 27 дней назад +1

      yeah but isnt svelte more performant? And being able to build to vanilla code is useful.
      But yeah all these frameworks are the same now. Might as well just use react 🤷‍♀️

    • @hamm8934
      @hamm8934 27 дней назад

      Even with it's compiler, the speed improvement is marginal since Vue's reactivity is already signal based, and once Vue releases it's Vapor compiler, it won't matter at all.
      Also, Vue follows the HTML spec closer than Svelte. In fact, Rich Harris of Svelte has just realized the importance of this and is making improvements in Svelte 5 to be more HTML spec compliant, while Vue has been spec compliant for years.
      Svelte 5 removes the point of differentiation from Vue with its addition of runes, computed, and refs. You might as well just use Vue for the same API with larger support and job opportunities, unlike Svelte.

  • @prashlovessamosa
    @prashlovessamosa Месяц назад

    Still waiting for the cyber Stack video please make something like CJ did on the syntax channel building NextJS boilerplate from scratch Please.

    • @bmdavis419
      @bmdavis419  Месяц назад +1

      Was gonna post that tmrw, but uh the svelte team kinda nerd sniped the FUCK out of me. They made something better: "npx sv create"

    • @prashlovessamosa
      @prashlovessamosa Месяц назад

      @@bmdavis419 yeah I have seen your video on Theo's channel I had no idea about that looks good but still curious what's in your arsenal I am sure it's goona be banger.

  • @robolist2277
    @robolist2277 Месяц назад +2

    first lol hehe

  • @nonefvnfvnjnjnjevjenjvonej3384
    @nonefvnfvnjnjnjevjenjvonej3384 Месяц назад +1

    all these frameworks now look the same.. dont really like it.. javascript folks are real sheep like.. same setups, same styles...