toad.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server operated by David Troy, a tech pioneer and investigative journalist addressing threats to democracy. Thoughtful participation and discussion welcome.

Administered by:

Server stats:

310
active users

#frontend

15 posts15 participants1 post today

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.

I've always favoured Google's material design system for my projects because it's got a lot of consistent components that are well documented and useful across most of not all platforms. I don't see the need to experiment with others unless I'm targeting a single platform (usually the web) or I've got a good designer on my team.