by ilrwbwrkhv · 1y ago · 0 comments
var foo = "something"
foo = "something else" -> ui updates
to:
$state('hello')
Runes and other nonsense immediately made me turn off Svelte.
Even Vue sort of moved away and started looking like React.
I think there is an opportunity now for another new framework which goes back to simplicity which Vue and Svelte tried to do.
Mithril really was as close to perfection as one can get.
Svelte 4 is simple in a single component. Svelte 5 needs a bit more boilerplate.
Svelte 4 was always very confusing in multi component/files workflows, especially when working with .ts/.js files. Svelte 5 is way better in this regard.
I'd pay the "slightly more boilerplate" price every day.
Anyway, if you don't want it like that you can continue to use the old system.
Without svelte 4 compatibility, you can just replace `$state` with `$`, `$derived` with `$$` or even some simpler mechanisms. Heck, I have vague intuition that we can reuse the `$: ` statements someway too, and still keep the new deep reactivity feature.
Might be svelte 6 will give us the proper answer. Or some newer fancy framework will take the hint and do it sooner.
The way the compatibility works is by seemingly identifying the file and either treating it in legacy mode or runes mode. I don't think what you are suggesting would have blocked them from doing what they are doing now.
At the very least the conversion between the versions will be very messy and error prones, especially using the migration tools.
Not to mention the designs of runes was still unstable back then. Heck even now it is still very awkward to use runes with sveltekit. You need $state and $effect everywhere for the page data.
Did it? Vue has composables that look kinda like react hooks syntaxically, but aren't the same thing at all, they are just better scoped mixins.