3 ms·
> The entire frontend was only ~75KB, and ~32KB after gzip! i think this is the pull quote. the whole app (https://sveltekit-todo.ameo.dev/ https://sveltekit-t
by swyx 5y ago
> The entire frontend was only ~75KB, and ~32KB after gzip!
i think this is the pull quote. the whole app (https://sveltekit-todo.ameo.dev/ https://sveltekit-todo.ameo.dev/) with complete with drag and drop and crud, comes in at 59-75% the size of the base runtime of React (7k, 3k gzip) + React-Dom (121k, 39.4k gzip).
and js bundle size isnt everything - Svelte wins on other developer experience factors as well, and is just missing ecosystem as OP noted.
- kirso 5y agoAs a beginner, I can't really emphasize how frustrating learning React is... at least compared to Svelte which is really just easy to understand and learning curve is less steep.
- richeyryan 5y agoOne thing to be very mindful of is that is a very limited application. The footprint of the various frameworks changes based on how big your application gets as shown here[1]. Swyx, I think you are probably aware of Ryan's article but it's worth contextualising for others who might not be familiar. The more components you have the more Svelte loses its edge. [1]https://dev.to/this-is-learning/javascript-framework-todomvc-size-comparison-504f https://dev.to/this-is-learning/javascript-framework-todomvc...
- swyx 5y agoyes am aware, but also in any realistic scenario, code splitting comes in well before the crossover point where that even remotely comes into question. this has been independently verified twice now: https://twitter.com/sveltesociety/status/1301168598988107776?s=21 https://twitter.com/sveltesociety/status/1301168598988107776... https://svelte-scaling.acmion.com/ https://svelte-scaling.acmion.com/ https://github.com/halfnelson/svelte-it-will-scale https://github.com/halfnelson/svelte-it-will-scale sveltekit has further opportunities for whole-app optimization but honestly given this research i lost interest bc its more than good enough
- metta2uall 5y agoIf a React developer is concerned about code size they can use Preact which is about 5kB: 3kB for Preact core [1], and 2kB for preact-compat [2]. [1] https://preactjs.com/ https://preactjs.com/ [2] "preact-compat adds somewhere around 2kb to your bundle size, but has the advantage of supporting the vast majority of existing React modules you might find on npm" https://preactjs.com/guide/v8/switching-to-preact/ https://preactjs.com/guide/v8/switching-to-preact/
- newlisp 5y agoWhat's the catch of preact? how can it be so small and provide the features/compability?
- metta2uall 5y agoThe major difference seems to be that preact uses native browser events, unlike react which implements "synthetic events" - so preact may have issues in old browsers like IE8 (https://preactjs.com/about/project-goals/ https://preactjs.com/about/project-goals/)