|
|
|
|
|
by supz_k
1000 days ago
|
|
"At first glance, this might seem like a step back — perhaps even un-Svelte-like. Isn't it better if let count is reactive by default? Well, no. The reality is that as applications grow in complexity, figuring out which values are reactive and which aren't can get tricky. And the heuristic only works for let declarations at the top level of a component, which can cause confusion. Having code behave one way inside .svelte files and another inside .js can make it hard to refactor code, for example if you need to turn something into a store so that you can use it in multiple places." This is absolutely true. I have been confused many times figuring out what are reactive states and what are not. I never knew Svelte needs changes like this, but seeing this, it sounds like a good plan. |
|