DEV Community

Discussion on: Pitch to me: why should I use Svelte?

Collapse
 
jesperhoy profile image
Jesper Høy

I moved from Vue.js (v. 2) to Svelte about a year ago.
I wrote a blog post comparing the two at jesperhoy.com/p55/svelte-vs-vue-js
I have incorporated Svelte into a few larger commercial projects.
For example, the page geografi.tjek.net/opgaver is a small Svelte SPA showing groups and lists of exercises (in Danish - for schools in Denmark).
Unfortunately most of my Svelte work is behind logins, so not much else to show.

Coming from Vue, Svelte was very easy to pick up, and now I much prefer the Svelte template syntax and coding style.
Svelte is more performant and bundle size is smaller (at least for small to medium sized projects).

The only thing that I don't like about Svelte, is that it requires build tools.
Even for the smallest widget on a server rendered webpage - you have to get everything setup with node, npm, etc.
Lately, I have been looking into Mithril and Lit-html for exactly this reason - tiny frameworks that work both with and without build tools. I might move on to something like that - just so that I can use one tool for everything.

Collapse
 
anzhari profile image
Anzhari Purnomo

I read your blog. The one caught my eyes were the cleaner syntax (without the this keyword) in favor of Svelte and the the deep reactivity in favor of Vue.
Also, I checked your sample page. I noticed that the Lighthouse score is very nice.
Thanks for sharing!