4 ms·
For what it's worth: to me Svelte is, for the lack of a better word, "better" React. It's another evolutionary step in the same direction. I wouldn't compare i
by kjksf 7y ago
For what it's worth: to me Svelte is, for the lack of a better word, "better" React. It's another evolutionary step in the same direction.
I wouldn't compare it to Angular.
Svelte is both easier to use (productivity) and generates faster code.
To me React is 2 things: components (reusable pieces that combine state with rendering logic in JavaScript / HTML / CSS) and reactivity (rebuilding UI from state).
Virtual DOM is an implementation detail that makes rebuilding UI from state fast enough in React.
Svelte also provides components and reactivity but with less typing (for me, the programmer).
While I know some people complain about more magic, my experience is opposite: Svelte maps more intuitively to the final JavaScript / HTML / CSS than React.
And it has CSS that is scoped by default to the component which removes the need for CSS-in-JS solutions.
- ng12 7y agoToo bad https://github.com/sveltejs/svelte/issues/1639 https://github.com/sveltejs/svelte/issues/1639 is still open :)
- lioeters 7y agoFor others who are curious, this is about TypeScript support in Svelte - an issue created a year ago. The following comment by the author sounds hopeful, that they've been working in that direction, and eventually it will happen: https://github.com/sveltejs/svelte/issues/1639#issuecomment-442974572 https://github.com/sveltejs/svelte/issues/1639#issuecomment-...