3 ms·
To be fair, the reason svelte 5 is that awkward to use is because they still need to be compatible with svelte 4 code. Without svelte 4 compatibility, you can
by npn 2y ago
To be fair, the reason svelte 5 is that awkward to use is because they still need to be compatible with svelte 4 code.
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.
- bangaladore 2y ago> To be fair, the reason svelte 5 is that awkward to use is because they still need to be compatible with svelte 4 code. 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.
- npn 2y agoIt does thought. You can't assign new meaning to $ and $$ and expect that it works flawlessly with magic statements and the stores. 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.