top | item 43477817

(no title)

joseneca | 11 months ago

Agh, I understand why runes were implemented, but I still can't get myself to like them. It feels like Runes take away from what made Svelte Svelte (the simple, concise syntax), and changes like this seem like slow concessions back in that direction anyway.

discuss

order

tiltowait|11 months ago

I felt the same way at first, but even in my small project, I've come to greatly appreciate them—or at least what they seem to enable. I've found deeply nested bindings to work without a hitch, which wasn't always the case in Svelte 4.

impulser_|11 months ago

You just have to build a big project with Svelte 5 and you will come to like them.

A lot of magic is okay for simple application, but when you want to build anything that scales Svelte before runes was just horrible. With Svelte 5 and Runes you can look at any component and instantly know what it does. You couldn't do that with Svelte 4 unless you wrote the whole code yourself.

afavour|11 months ago

I think that's actually the core of the problem. It's the right choice for big projects. But Svelte was an absolute joy to use when brewing up a small or medium size project that you want to just work first time.

Runes are the right choice for the library, but there is still a loss there.

pier25|11 months ago

I agree. I ported a non trivial project last year from 4 to 5 and runes are a game changer.

rafram|11 months ago

They really are an improvement. Tracking data flow in a complicated component (bound props going in both directions, derived state, …) was terrible before runes — you just had to rely on compiler magic, which worked until it didn’t. Now it’s more or less obvious.

nailer|11 months ago

I wish they had found a way to make the compiler just work. No longer having the ability to update the DOM by updating bound variables eliminates one main reason I wanted to use Svelte in the first place. I still love SFC though.

distalx|11 months ago

I get why runes, but you're right. That simple Svelte I loved feels a bit further away now. Not sure how I feel about it long-term.

jwilber|11 months ago

Agree. Loved Svelte, but after the update I made the switch to React and can’t imagine going back outside of small, static viz apps.