Live data from Hacker News

Svelte 4

svelte.dev

11–20 of 227 posts

Re: Svelte 4

#11

I've used Svelte 3 and I like it, but honestly this is the problem I have with most JS projects. Svelte 3 had 3000+ experimental features and hacky stuff, why go into 4 when 3 itself has not mature yet?! Software support is basically the thousands of low-paid js dev jobs that companies hire to update their stack every 6 months?

[deleted]

Re: Svelte 4

#12
The release was livestreamed on the Svelte youtube: https://www.youtube.com/watch?v=72TIVhRtyWE

also

> 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 distributing a CJS build, and once the eslint rewrite is completed the Svelte package size can drop by over another 50%.

Re: Svelte 4

#13
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.

Re: Svelte 4

#14
post #13

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.

Massive reduction in boilerplate. As someone who attempted to onboard onto both react and svelte for a couple days each, react continued to feel hyper unintuitive with a bunch of magic constructs. Svelte felt like I could guess what would work and it just did.

Caveat: since I went react -> svelte it's possible I was just warmed up to JS by that point

Re: Svelte 4

#15
post #13

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.

Most folks would probably say "it's faster" but I think the real upside of using Svelte is the DX. It's just massively simpler and way easier to be productive.

Re: Svelte 4

#16
> The number of dependencies in Svelte has been greatly reduced from 61 down to 16

Adore this. Would love to see more JS frameworks reduce their dependency trees.

Re: Svelte 4

#17
post #13

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.

It’s cleaner and conceptually easier to work with than React & hooks, and tends to produce smaller bundles and faster apps.

Re: Svelte 4

#18
post #13

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.

It's basically a different flavor of modern web app development. It's key difference is that it doesn't download a full JS library to the client. The saves some ms/s on initial load. For most applications, that is not really an issue but, of course, there are some scenarios that it suits.

Re: Svelte 4

#19
post #13

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 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 particularly nicely with TypeScript but this release may prompt me to give it another look.

Re: Svelte 4

#20

In order from most favorite to least favorite: StencilJS SolidJS Svelte React Vue Angular

I just rebuilt a web app in Vue (and Vite), and first-class Single File Components are the dream. Is there anything that even approaches that simply joyful DX?
Post reply on HN