|
|
|
|
|
by gyanreyer
1064 days ago
|
|
Well, JavaScript has no simple way to react to an assignment like count = count + 1 without introducing some magic between the code you write and the final code that runs in the browser. Svelte is only able to achieve that experience because it has a compilation step, but React does not; hence why setState() is necessary and why people argue it's more "just JavaScript" because the code you write is pretty much the final code that runs (aside from the transpilation necessary to convert JSX syntax into JS, but this doesn't alter the way that anything works). This isn't to make any kind of judgement on either approach though, I personally really enjoy the DX that Svelte offers. |
|