3 ms·
It's interesting to me because, although I'm not frontend so have limited experience with those, I have the exact opposite opinion of Vue. > Vue is Lightweight
by remram 6y ago
It's interesting to me because, although I'm not frontend so have limited experience with those, I have the exact opposite opinion of Vue.
> Vue is Lightweight and Flexible
> Vue is less intrusive than React
The standard React might be heavy, but the core reactive code and the part I use are definitely much lighter. It's just reconciliating virtual dom trees that are explicitly built by my code. Vue hooks into all data objects, to react to mutation. Vue includes a whole templating language, that have control structures in addition to JSX features (v-if, v-for, ...). Vue is supposed to be used in .vue files, that are a unique way to organize code, and is going to require special support for your editor, linters, and other tools.
> The html/css and JS are separate while in React everything is in JS.
My HTML is at the bottom of my my JSX file, in the render() method I keep at the bottom. My CSS is in CSS files. In Vue, the correct way seems to be using the <template> and <style> sections of the .vue file. Is that more separate?
I have nothing against Vue per se, and opinionated frameworks have their merits, but do Vue developers agree with the author's stance?
- fraktl 6y agoI chose Vue because I despise Facebook from the bottom of my soul and I don't want to use tools made by them. That's it. React is actually fantastic, but I'm an old frontender and using React instead of Vue won't really do much for me - I'd still face the same problems, which are related to business logic. Ultimately, we all end up writing JavaScript when all the nice boilerplate, buzzwordy paradigms and rendering issues are taken care of. Therefore, the only comparisons I respect are subjective ones. I like Vue. I'm expressive with it and can take care of the goals I have to achieve. I've no reason to try something different, and that also makes me incompetent to judge React in detail as I haven't used it to the same point I've done with Vue. > My HTML is at the bottom of my my JSX file, in the render() method I keep at the bottom. My CSS is in CSS files. In Vue, the correct way seems to be using the <template> and <style> sections of the .vue file. Is that more separate? You can split your HTML / CSS / JS into separate files, or combine everything in one, or do a mix of whatever pleases you, or you can simply use JSX with Vue. I prefer to split everything in its own file, it makes it easier to find.
- gtrhtrhtrhtr 6y ago> I despise Facebook from the bottom of my soul Why?
- brlewis 6y ago> Vue includes a whole templating language, that have control structures in addition to JSX features (v-if, v-for, ...) This is why I like JSX better than idiomatic[0] Vue. Using SGML syntax for programming logic or other things it was not designed for ends you up here: https://news.ycombinator.com/item?id=19951229 https://news.ycombinator.com/item?id=19951229 [0] I am aware that JSX is possible with Vue, but I believe it's rarely used. If you think I'm wrong, wait to correct me until after you correct the article author, who says that Vue projects all follow the same structure.
- pier25 6y agoI started using Vue in 2015. I still maintain a couple of project with it but it's not my default choice anymore. It's a bit lighter than React but if you care about weight, Preact, Svelte, Mithril, Solid, Inferno, and others would be a better choice. It's not more flexible than React. Quite contrary. At least for Vue 2 (I haven't used the composition API of Vue 3). Having used both for some years, I find Vue to be more intrusive than React. In some aspects Vue is more pragmatic but OTOH it's quite inelegant. I recommend Vue to people getting started with modern front end, specially because you can use it without a build setup and just the JS basics. It's great for backend devs, or designers that only know HTML and a bit of JS. I don't really see the point for experienced JS devs.