4 ms·
The whole selling point of Svelte was that it was simple, like a breath of fresh air. You could update the state of your component just by assigning a variable.
by spencerchubb 3y ago
The whole selling point of Svelte was that it was simple, like a breath of fresh air. You could update the state of your component just by assigning a variable. I guess this is the natural progression of web frameworks.
- onsclom 3y agoTo be fair, assignments to variables still update the state of your component. `count += 1` will still update the state of your component. I think what you meant is that you now need to explicitly declare `count` as state. Personally, I think the magic of Svelte is that assignment part. And now the magic of Svelte works across files and even inside regular `.ts` and `.js` files!