Ask HN: Is Svelte lean and pragmatic or missing something?
When working with React I spent a lot of time, also out of curiousity, on different solutions for certain problems (Think of Redux, MobX, and Recoil or React wrappers like React-Konva). With Svelte I don't do that. It seems most basic functionality is included in a thin layer of abstract above HTML, CSS, and JS (ref. The truth about Svelte by Rich Harris) and the Svelte standard library. From state management, reactivity, and with SvelteKit, to SSR and code splitting. For problems not covered is was, until now, always easy to use TS/JS.
Question: is Svelte lean and pragmatic or is it missing something?
Note: I know React, use it, and like it (especially with hooks & Redux-Toolkit). As I am far from senior, maybe there are some complexities I am not seeing yet.
8 comments
[ 4.4 ms ] story [ 28.9 ms ] threadIt has good developer experience, but not much usage as say React.
that was at least a year ago so if those issues are resolved then it’s a compelling framework to play with for sure, I like how Svelte feels just like HTML/CSS/JS and Svelte performance could be superior to React if certain claims are true about disappearing framework vs virtual dom. Not sure how SSR impacts those performance pros and cons between Next and Svelte so it’d be interesting to find published and updated latency benchmark numbers for both.
React hooks can be different to reason about though because of immutable state patterns vs two-way data binding; I actually really like the hooks and immutability ideas, but two way binding is much more elegant and simple sometimes. Edit: also those don’t have to be exclusive
Regarding debugging and errors, it feels that less code and so much features being already included, and thus out of "one hand", seem to reduce bugs for me.
Having a complier could also open doors to catch bugs at compile time.
Some other benefits that I like:
And SvelteKit is taking all this to the next level with making Svelte available throughout the full stack. Heck, I'm making a SaaS boilerplate built on top of SvelteKit because I love it so much: https://sveltesaas.com/Some drawbacks to Svelte:
Last versions of react seems to have overcame most of that burden though.