I've been trying different frontend JS frameworks in some of my projects, and I'm... not as impressed with Svelte as I thought I'd be.
I've heard constant praise for this framework, and it is technically impressive, but there's just so much magic. Svelte 5 uses built-in not-quite-functions called runes, like $state
or $derived
, to mark certain variables as reactive state. When something reactive is updated, components redraw; otherwise, they don't. And when they don't, it's often very hard to figure out why. Plus the usual problems of the Vue-style component files: components aren't first-class objects, you have to put them in their own files, there's no JSX, etc.
I've written a lot of React, and React hooks are magical too, but this seems worse. Does it just feel that way because I've taken the time to get used to how React does things?
Maybe I'd use Svelte again on a project with (ironically) less reactivity, but my chat app uses websockets and indexeddb and lots of event streams, and Svelte just keeps getting in the way.
I'm considering trying Mithril.js next, which is, philosophically, the exact opposite. Sounds like a breath of fresh air.