←back to thread

Svelte 5 Released

(www.npmjs.com)
390 points begoon | 1 comments | | HN request time: 0s | source
Show context
impulser_ ◴[] No.41891160[source]
Why should someone use Svelte 5 over Vue 3?

Performance might be the only reason IMO, but once Vue Vapor is release that will most likely not be an advantage.

The Vue3 and Svelte 5 API are almost the exact same, but Vue can be used in TS/JS and Svelte 5 can't.

I do think SvelteKit is better than Nuxt by a lot. Maybe that's a big advantage.

replies(3): >>41891256 #>>41891663 #>>41892984 #
written-beyond ◴[] No.41891663[source]
Well I don't know how Vue3 is but I used Vue before, don't know exactly which version it was.

I found the mental model behind managing state in Vue a little difficult. There was a lot of syntax I had to learn/understand before I could work with it. OTH when I first worked with a svelte working with the code base was extremely straightforward, and that was my very first time touching JS.

I think the main reason for Svelte5 to exist was that state can now be shared beyond the boundaries of a .svelte file. They needed a reactive stateful primitive which is the $state addition.

I recently tried to start building something in NextJS, I worked with react a little bit and thought it really isn't going to be that hard. I honestly didn't get far, I really needed to understand a bunch of concepts before I could just start working. This isn't something I experienced when I started working with Dart&Flutter.

I appreciate all of the work other authors have put in to make UI in plain JS and not bend the language to their whims, but I don't think UIs can be built ergonomically without that. Historically UIs have always been best expressed in languages built around that fact. HTML, CSS and Vanilla JS pushed the envelope for UI development but with what's expected from UIs in this age of browser based computing, that model just doesn't age as well given the complexity it adds.

It's why I reckon people won't give up on making UI frameworks in Rust, because it's macro system allows the authors to build supports around a language that really could not get far on just it's own.

replies(1): >>41894494 #
1. WickyNilliams ◴[] No.41894494[source]
You probably used Vue 2. Vue 3 essentially uses signals for reactivity and it's very straightforward once you have a mental model. It's model is very similar to svelte 5