What if it is opt-out reactivity in .svelte files and opt-in reactivity in .ts/.js files? Yeah I know it would be a bit more combersome to copy code from .svelte to .js/.ts files but I think it would be worth it
What if it is opt-out reactivity in .svelte files and opt-in reactivity in .ts/.js files? Yeah I know it would be a bit more combersome to copy code from .svelte to .js/.ts files but I think it would be worth it
I'm just brainstorming here, but what about an optional $reactive rune where everything in that is reactive by default?
$reactive(() => { let name = 'world'; });
vs
let name = $state('world');
$:{ let name = 'world'; };
vs
let name = $state('world');
$: is valid javascript right? So that should also work in .js/.ts files I assume
The $: label syntax is valid JavaScript, but allowing scoped variables to be accessible outside of scope is very invalid JavaScript.
Tbh this seems kinda rude. Maybe check github i am sure the whole journey can be seen there.