3 ms·
Creator here. We get this question a lot, and should probably dedicate a blog post to it. It's true that the incremental cost per-component is higher than with
by rich_harris 7y ago
Creator here. We get this question a lot, and should probably dedicate a blog post to it.
It's true that the incremental cost per-component is higher than with some frameworks. In theory, you hit an inflection point. In practice though this doesn't really happen, because by the time you get there, you should be code-splitting anyway — and each of your code-split chunks have a hard minimum size which is the size of the framework.
This article reinforces that finding by testing the 'RealWorld' project: https://medium.freecodecamp.org/a-realworld-comparison-of-front-end-frameworks-with-benchmarks-2019-update-4be0d3c78075 https://medium.freecodecamp.org/a-realworld-comparison-of-fr.... It's based on an outdated version of Svelte but the broad strokes will be unchanged.
Of course, Svelte is about far more than just bundle size!
- flanbiscuit 7y agothanks for the response! Interesting that this article you linked did not include Preact in its tests but I do see what you mean. Keep up the good work! I think Svelte is really cool. Like I said before, I like the idea of it. I am going to promote it to the rest of my team and hopefully we can give it shot on one of our next projects.
- webappguy 7y agoHow does Svelte compare directly To more minimal Reactive libraries like most.js or flyd.js? Even MobX? Besides the dissapearing at runtime? It looks very cool I'd like to see how it performs with some complex DOM opps. Might mess around today.
- rich_harris 7y agoThose are all libraries for state management. Svelte is a UI framework. It incorporates its own state management (https://svelte.dev/tutorial/reactive-assignments https://svelte.dev/tutorial/reactive-assignments for local state, and https://svelte.dev/tutorial/writable-stores https://svelte.dev/tutorial/writable-stores for cross-component state), but you can also wrap third party libraries if needed.