3 ms·
Vue.js has single file components [1] and template precompilation [2] (or optionally JSX support, which is basically a precompiled template). I don't see the p
by the_duke 10y ago
Vue.js has single file components [1] and template precompilation [2] (or optionally JSX support, which is basically a precompiled template).
I don't see the point of yet another framework here.
The "no dependencies" argument seems to fall down for me, since it would seem to me that they would need to duplicate a lot of code for state management and rendering, bloating the code for anything more complex.
And if there's some clever tree shaking or whatever going on, than I don't see the point as opposed to just including another JS file...
I couldn't find any explanation of what's so different here, worthy of creating another framework for it. Would love to be enlightened!
[1] https://vuejs.org/v2/guide/single-file-components.html https://vuejs.org/v2/guide/single-file-components.html
[2] https://www.npmjs.com/package/vue-template-compiler https://www.npmjs.com/package/vue-template-compiler
- sheeshkebab 10y agothere is always room for a framework smaller than other frameworks. mature frameworks tend to get bloated overtime, become hard to reason about and learn for new developers. if it wasn't for projects like that we'd be coding in some feature rich ims/cobol framework.
- rich_harris 10y agoAs well as generating smaller apps and being quicker to load, Svelte is significantly faster than Vue. We'll be publishing benchmarks soon.
- the_duke 10y agoI'd love to see code size and performance comparison for a relatively simple but non trivial component, like a DateTime picker.
- rich_harris 10y agoYep, we'll be adding more examples soon – definitely on the TODO list. In the meantime you can take a look at our TodoMVC implementation – it's 3.6kb zipped (Vue is 17.2kb without any app code. Not a criticism, just context) https://svelte-todomvc.surge.sh https://svelte-todomvc.surge.sh
- Touche 10y agoSo if you want to use a router in Vue what do you do? Well, you install vue-router. The point of Svelte is that it can infer all of the features you are using for you, and not compile the ones that you aren't.