2 ms·
> What deep tradeoffs are Solid or Svelte making in exchange for their speed? For Svelte, the comment you replied to already said that: > Svelte gets those ga
by Vinnl 4y ago
> What deep tradeoffs are Solid or Svelte making in exchange for their speed?
For Svelte, the comment you replied to already said that:
> Svelte gets those gains by putting another compiler in your build pipeline, a tradeoff unacceptable to many.
To emphasise, this was also the reason why it took so long for it to get TypeScript support (and I'm still not sure if everything's properly typed now, which is a common problem with template-based languages, but let's assume it is).
Additionally, I think (but haven't worked with Svelte, so could be wrong) that Svelte is a lot harder to write unit tests for? As in, you can just use React's virtual DOM in Node without needing to spin up a browser. With a quick glance I don't see any references to testing in the Svelte docs.
Solid I'm less familiar with, but AFAIK its architecture requires you to put logic back into your templates again, with components like <For>, <Switch> and <Match>, presumably limiting what you can do. And I totally get that the advantages of Solid's architecture make that worth it, but usually, if you can't spot trade-offs in advance, the reason is that you'll run into them later, rather than that there aren't any. So I'm sure I'd find more if I were to actually work with either of these frameworks. And yet I might then still conclude that they're worth it!