No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Anybody tried out Svelte framework yet?

    Hangout
    6
    17
    1202
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      walfin last edited by

      I just read about it today and my mind was blown.

      It’s kind of like how I felt when I first learnt about Vue.

      I’m amazed at how they can shift so much reactive complexity into compile time and drastically speed up the browser. Now, unless Vue can ship with a pre-compiler in v3 that does away with the V-DOM, there’s no way either React or Vue can hope to beat Svelte’s performance once it matures. And with Svelte, Vuex and Redux are basically useless.

      What do you guys think?

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by s.molinari

        Svelte doesn’t support TypeScript (yet). It’s solution to the VDOM isn’t the bowl of cherries one might think. You can’t do anything with Svelte without its compiler. Evan You has said, Vue 3, with its new template compiler, will be at a Svelte level in performance. And, unless you are doing something wickedly wild with Vue, it’s performance is plenty good for a reactive UI. In other words, Svelte’s performance will only be good for those who don’t actually know what they are doing. It’s an optimization nobody is really needing.

        Scott

        dobbel necmettin 2 Replies Last reply Reply Quote 0
        • dobbel
          dobbel @s.molinari last edited by

          @s-molinari

          a very nice read. Although I don’t get the first speed comparison. Page load times are 459ms vs 249ms for React vs Svelte . In my calculations that’s not 0.15 seconds faster but 0.211 seconds. I would consider 0.2 sec a noticeable difference for (at least some) users loading a web page.

          Another way to look at the speed difference is: Swelte has a 45% reduced page load times compared to React. Sounds pretty impressive to me…

          Or do I miss something?

          qyloxe 1 Reply Last reply Reply Quote 0
          • qyloxe
            qyloxe @dobbel last edited by

            @dobbel you need to watch for that statistics as a dynamical system not a static, always truthful constant.
            The react or vue were created and optimized when svelte wasn’t in the horizon. Now, when people have svelte and they are convinced to make such comparisons, then we should wait for the answer of react or vue people. The reaction may something like “oh, we in React are the best, we need to cut and optimize our code base, we need to win in all the comparisons possible” ha ha or it could be “we essentially don’t care, because it is not a comparison of functionality or components 1:1 it is only a comparison of some part of behaviour, please upgrade your svelte to what we offer and come back”.
            At the end of the day it is you who decides, not those comparison, and if I can only suggest something, do decide not what you need now, but what will you probably need in the future of at least one year. If you start a project with svelte, vue, react now, you will be deploying it, with the version of this framework from the year in the future.

            1 Reply Last reply Reply Quote 0
            • Ben Hayat
              Ben Hayat last edited by

              Well, over a year ago I went through the Rabbit hole of Svelte and guess what, I’m back in Vue & Quasar. A simple (but my wasted time) answer.

              1 Reply Last reply Reply Quote 2
              • s.molinari
                s.molinari last edited by s.molinari

                Interesting is, I’ve also taken a snapshot of the Vue numbers for the same app. Not bad. 🙂

                535e0ede-5274-4f4f-b228-5d75a1c27104-image.png

                Scott

                1 Reply Last reply Reply Quote 0
                • s.molinari
                  s.molinari last edited by s.molinari

                  Well, I’m wondering what he measured now too.

                  Svelte
                  3faed7cc-03cb-49ec-bd15-bb8f09c57bfb-image.png

                  React

                  0e50aef5-db25-4524-8fa3-b5f324fcd96f-image.png

                  Scott

                  1 Reply Last reply Reply Quote 0
                  • s.molinari
                    s.molinari last edited by

                    But, overall, really not worth talking about.

                    Scott

                    1 Reply Last reply Reply Quote 0
                    • W
                      walfin last edited by

                      I saw this tweet:

                      https://twitter.com/youyuxi/status/1184824857663594499

                      I hope Evan is right.

                      For the foreseeable future, I’m sticking with Vue :).

                      1 Reply Last reply Reply Quote 0
                      • Ben Hayat
                        Ben Hayat last edited by

                        Recently, I saw an extensive test comparison between Angular, React, Vue 2.x, Vue 3 (Beta) and Svelte.

                        Svelte was the fastest all around.
                        Then it was Vue 3. Very close to Svelte, except the load time. Obviously Vue library makes it larger.
                        Then it was Vue 2
                        Then React
                        Lastly Angular. It had the longest load time.

                        So yeah, Vue 3 should be a game changer especially running on Mobile.

                        1 Reply Last reply Reply Quote 0
                        • W
                          walfin last edited by

                          🙂 Haha those poor folks who spent all that time learning Angular.

                          1 Reply Last reply Reply Quote 0
                          • necmettin
                            necmettin @s.molinari last edited by

                            @s-molinari said in Anybody tried out Svelte framework yet?:

                            You can’t do anything with Svelte without its compiler.

                            How is this an argument? Svelte IS the compiler. The counter-argument would be “You can’t do anything with Vue without the Vue framework.”

                            qyloxe 1 Reply Last reply Reply Quote 0
                            • qyloxe
                              qyloxe @necmettin last edited by qyloxe

                              @necmettin said in Anybody tried out Svelte framework yet?:

                              @s-molinari said in Anybody tried out Svelte framework yet?:

                              You can’t do anything with Svelte without its compiler.

                              How is this an argument? Svelte IS the compiler. The counter-argument would be “You can’t do anything with Vue without the Vue framework.”

                              I believe he meant the distribution options of Vue. You can use production Vue in “runtime” mode, or in “full” mode - with Vue compiler. More here:

                              https://vuejs.org/v2/guide/installation.html#Explanation-of-Different-Builds

                              IMHO argument stands. Not that it matters, but technically it is valid.

                              1 Reply Last reply Reply Quote 0
                              • s.molinari
                                s.molinari last edited by

                                @necmettin @qyloxe is correct.

                                Scott

                                1 Reply Last reply Reply Quote 0
                                • s.molinari
                                  s.molinari last edited by

                                  To that point too, Svelte isn’t a library or framework, but rather a language extension.

                                  Scott

                                  W 1 Reply Last reply Reply Quote 0
                                  • W
                                    walfin @s.molinari last edited by

                                    @s-molinari said in Anybody tried out Svelte framework yet?:

                                    To that point too, Svelte isn’t a library or framework, but rather a language extension.

                                    Scott

                                    That’s what Rich Harris himself said: https://gist.github.com/Rich-Harris/0f910048478c2a6505d1c32185b61934

                                    1 Reply Last reply Reply Quote 0
                                    • s.molinari
                                      s.molinari last edited by s.molinari

                                      Yup. I read that too.

                                      It’s also important to note that performance is only one part of the pie. I think developer experience (also known as DX) is important too.

                                      Although Svelte follows the similar path of SFC’s like Vue, and I truly believe this format for setting up your code is easier to reason about overall (so good for DX) than mixing JS with HTML, there are situations where going down to render function level is also necessary and that is where Svelte, I believe, misses out. Its @html directive is nothing like what is needed from what I can tell. I can only imagine such “html in JS” code will look mofugly and even harder to reason about than some of the bad React JSX code out there.

                                      Anyone whose used Svelte at any kind of advanced level, please do chime in and correct me, if I am wrong.

                                      Scott

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post