2 ms·
Svelte isn't a strict win-win. It requires a compiler, and forks of JavaScript and HTML. And it isn't actually very different from React or Vue anyway, and in
by spankalee 3y ago
Svelte isn't a strict win-win. It requires a compiler, and forks of JavaScript and HTML.
And it isn't actually very different from React or Vue anyway, and in fact quite a bit more limited than Vue (not necessarily bad).
Saying:
“I’ll figure it out for you at compile time.” —Svelte
is just a non-technical, basically non-meaningful statement.
You need to know _what_ it figures out exactly. What state and what state changes are observable? These things matter more than whether it's done at compile time or runtime.
And I think the author is ascribing far more power "compile time" than what's actually happening. Svelte is not doing some kind of sound data flow analysis on your JS code to figure out what could change and rewriting your code to be observable (something not really possible anyway). It's using specific syntax conventions to make some variables into shallowly observable properties. And it adds "store" concept, which is more-or-less Signals as popularized in Solid, now Preact, and soon Lit and Angular.
- lnenad 3y ago> Svelte isn't a strict win-win. It requires a compiler, and forks of JavaScript and HTML. These points weren't touched upon by the author. He compared the frameworks from one perspective and one perspective only.