Could someone give a one or two sentence explanation of why I would want to use Svelte over something like React? I have heard it is "better", but have never understood why.
Svelte 4
101–110 of 227 posts
Re: Svelte 4
#102Earlier quoted context omitted.
Speaking about size reduction, I once had a client who want me to update his product as it became extremely slow and buggy. The product was an MS Word Add-In that was run on an MS Surface which takes shots using webcam and insert them into the active document, it was built in .Net and the previous developer used, as I recall, OpenCV library to take the shots. The installation binary was around 300MB! And, to add insu…
> clean Surface Eh, that's not a fair comparison, Windows bundles the .NET standard libraries and runtime.
Re: Svelte 4
#103hope it adds a client side router, and provides a true SPA mode(not the sveltekit stuff), before then, no plan to use svelte again as my use cases is 100% SPA with 0% SSR, absolutely nothing with SSR.
Re: Svelte 4
#104This is odd timing with Rich Harris just releasing a course on Svelte v3 on Frontend Masters (June 12th 2023). https://frontendmasters.com/courses/svelte-v2/ From the migration there does appear to be some breaking changes, don't know how that aligns with the course which I planned to take. His old course was good as well, but that relied on Sapper.
The breaking changes aren't really gamechanging stuff, just cleaning up baggage in preparation for Svelte 4.x and Svelte 5. The course would still be fully applicable
Re: Svelte 4
#105hope it adds a client side router, and provides a true SPA mode(not the sveltekit stuff), before then, no plan to use svelte again as my use cases is 100% SPA with 0% SSR, absolutely nothing with SSR.
Re: Svelte 4
#106Could someone give a one or two sentence explanation of why I would want to use Svelte over something like React? I have heard it is "better", but have never understood why.
Svelte tries to improve upon the relatively complex/heavyweight runtime of something like React by shifting as much of that complexity to the build step as possible. It also takes a more "batteries-included" approach compared to React by including some opinionated features like state management, animation, transitions and the like. I haven't dug too deeply into Svelte because last I checked it didn't play particularl…
Svelte state management, for example, is just the `subscribe(callback: () => void) => Unsubscriber` interface. A couple of utility store functions are provided like `writable` and `derived` but state management libraries don't need to know anything about Svelte, just provide that single life cycle method. The context API looks almost exactly like React's.
Re: Svelte 4
#107Could someone give a one or two sentence explanation of why I would want to use Svelte over something like React? I have heard it is "better", but have never understood why.
JS frameworks are like coffee, some people like them milky and full of sugar, some people like them like them lean and black, some are obsessed with making the "worlds best coffee" at home every morning, and some drink whatever brown water comes out of a vending machine. We all like our coffee different, just as we all have favourite features and designs of frameworks. There is no correct, or best, framework, only pe…
Re: Svelte 4
#108Time for a very naive question. As somebody looking for a more effcient (less re-rendering) and nicer DX (template based, stuff like exit animations) alternative to React, what actually makes Svelte measurably better than Vue? On first (and very naive) look the two seem pretty similar, with the biggest difference being that Vue seems to have the much bigger ecosystem and more mature tooling (I keep hearing about Svel…
The biggest advantage of Vue is the ecosystem. However, Svelte is catching up. Some interesting UI component libs have recently arisen, e.g. https://skeleton.dev.
Performance wise, both are super fast.
Make sure to check out Sveltekit, even for building pure SPAs. The routing and data loading are worth it alone.
Re: Svelte 4
#109> Svelte 4 reduces the Svelte package size by nearly 75% (10.6 MB down to 2.8 MB), which means less waiting on npm install. This improvement will be especially noticeable for users who are loading our interactive learning experience on learn.svelte.dev for the first time, users of the Svelte REPL, and users with limited connectivity. The majority of the remaining package size is eslint support, which necessitates dis…
Speaking about size reduction, I once had a client who want me to update his product as it became extremely slow and buggy. The product was an MS Word Add-In that was run on an MS Surface which takes shots using webcam and insert them into the active document, it was built in .Net and the previous developer used, as I recall, OpenCV library to take the shots. The installation binary was around 300MB! And, to add insu…
Re: Svelte 4
#110Earlier quoted context omitted.
JS frameworks are like coffee, some people like them milky and full of sugar, some people like them like them lean and black, some are obsessed with making the "worlds best coffee" at home every morning, and some drink whatever brown water comes out of a vending machine. We all like our coffee different, just as we all have favourite features and designs of frameworks. There is no correct, or best, framework, only pe…
Big disagree on the not using a framework part: far too often that's not so much a lovingly honed craft but an echo of the "websites should work just fine without JavaScript" that has long been given up as a goal but still haunts decisionmaking as an ideal that now serves as an excuse to consider everything client side secondary citizen. "It's JavaScript, right? It's supposed to an unmaintainable mess." If you dig de…