6 ms·
Can someone explain why someone would choose Vue over React (or one of the clones)? When I looked at the docs for Vue it reminded me of my Backbone days.
by dntrkv 10y ago
Can someone explain why someone would choose Vue over React (or one of the clones)? When I looked at the docs for Vue it reminded me of my Backbone days.
- jakecodes 10y agoBackbone is a structural JS library/framework. It gives your app a backbone. Vue provides data binding so your View(Vue) gets automatically updated when data changes. Completely different.
- bcherny 10y agoBackbone implements 1-way binding via model:change event + render(). Vue/React/Angular do various forms of diffing, which makes their incremental rendering more efficient than Backbone's.
- jordanlev 10y agoIf you already know react and are happy using it, then there's no reason to use Vue. But if (like me) you were never quite able to figure out how to use React (especially all the build tooling that's suggested in every tutorial), then Vue is worth a look as it's incredibly simple to get started with and easier to learn. I find it especially appeals to people coming from a place of familiarity with html and css (whereas react seems to appeal to people with more of a straight-up programming background). YMMV
- ng12 10y ago> easier to learn I think this is problematic because people don't differentiate between React and the React ecosystem. Plain old React is just as easy (probably easier) than learning Vue. I always recommend the official React tutorial (https://facebook.github.io/react/tutorial/tutorial.html https://facebook.github.io/react/tutorial/tutorial.html) before even thinking about Redux or Webpack or whatever.
- therealmarv 10y agoThat's true. React itself is also clean and simple... but things tend to be more complicated in React, the ecosystem when you go to the SPA direction.
- zyxzkz 10y agoI sorta hate that React is so simple and the ecosystem is such a clusterf*ck. I wish they came out with a storage/persistence system as simple conceptually as the renderer. Maybe that's a lot to ask for though. React by itself gives me blue balls.
- zmmmmm 10y agoI have a theory that every project eventually approaches a level of complexity reflecting the level at which a moderately intelligent person can't understand it any more. I think of it as a "complexity budget". So if you start with something simple (say, React) then people will just invent more layers of complexity around it to solve whatever the next layer of problems is (Redux, Webpack, etc). And they won't stop until the complexity budget is all used up.
- spion 10y agoThere is one, and its called MobX: https://mobx.js.org/getting-started.html https://mobx.js.org/getting-started.html
- deleted 10y ago[deleted]
- jordanlev 10y agoOf course it's subjective, and different people coming from different backgrounds / experience levels find different things easier than others. But... that tutorial you say you like to show people utilizes jsx, which needs to be compiled with something (right? Or does react do the compilation automatically at runtime now and I missed that memo?). And for people coming from a place where they are very comfortable and familiar with html and css, and maybe a light sprinkling of jquery on top, Vue is way more approachable than the tutorial you linked to.
- ergo14 10y agoThen you should look at Polymer. It is just DOM nodes (custom elements_, you can however compose complex applications with it without any trouble. I feel its very straightforward way to build applications and most parts of it are handled by browser API's. It seems like a perfect middle ground between react/angular 2/vue - and you can still throw in redux or uniflow-polymer if you want.
- rk06 10y agoThe major problem with polymer is that it does not support npm. It seems polymer 2 will support yarn. but until then, it is a no go.
- ergo14 10y agowhats the problem with using bower (apart being "legacy"), it suddenly stopped working? Not all packages are on npm, i use mix of npm and bower without issues. When the JS community comes up with better npm will people stop using packages on npm?
- thewhitetulip 10y agoI had the same problem, couldn't figure out how to use React, I started learning VueJS and in a week I had built a fully working app, https://github.com/thewhitetulip/Tasks-vue https://github.com/thewhitetulip/Tasks-vue I started to write this tutorial, an example based guide, https://github.com/thewhitetulip/intro-to-vuejs https://github.com/thewhitetulip/intro-to-vuejs
- therealmarv 10y agoIt's like the ideal mixture of React and Angular. You can use more the template approach than in React (where everything tends to be a component). Footprint (size of libs) is also smaller than React while still having VirtualDOM and speed of React. What I also experienced: It's much simpler to add Vue to existing HTML code without the need of bundlers and build tools like Webpack etc. Also keep in mind that Vue ecosystem is more from one hand: Vue itself, the store (Vuex), the router... all from one single source and team and not cluttered from various teams like in React ecosystem.
- elliotlarson 10y agoI'm mostly a backend Rails developer, but I've spent the last 3 months developing stuff with Vue, Elm, React, and Angular 2 in an effort to see which of the front-end frameworks I would like best (I messed with Ember a year ago but haven't had a chance to revisit since). To me it seems like React is about putting logic in code instead of templates/markup. Vue is more in the vein of Angular, where you have logic in your templates/markup. So it's sort of a question of what you feel more comfortable with, the style of Vue or the style of React. Instead of Vue or React, you might choose Angular 2. Vue is sort of touted as "Angular done right". I did enjoy working with Vue (I actually enjoyed working with all of them), but I think Angular 2 may be "Angular done right". However, Vue seems to try to be more lightweight and less of a framework than Angular (1 or 2). It has this in common with React. I think both Vue and React would be easier to start introducing into an existing app incrementally. Angular 2 seems like it's more of a framework/holistic choice. It has this in common with Ember, although this is true of Ember to an even larger degree.
- Jarwain 10y agoWhat are your thoughts on Elm compared to the other three?
- StavrosK 10y agoIsn't elm a language? Why compare it with frameworks?
- elliotlarson 10y agoSo, I'm still a noob with this stuff, but it's my take that Elm is both a language and a front-end framework. It's a language that compiles down to JavaScript that also gives you a React-like toolset to develop front-end code with.
- himlion 10y agoPeople compare Rails to python/PHP often enough.
- ww520 10y agoI've tried out both. I like Vue because I can work with standard HTML and augment it with Vue, whereas React requires using JSX. JSX is proprietary and HTML is kind of hidden. There's an additional mental translation when writing JSX.
- msoad 10y agoReact has no templates which is an advantage until it hits you with large bundle sizes. Every line of JSX is transformed into a longer JavaScript program. I love that React makes developers more productive with JSX but there should be a way of outputting HTML for large template like React components. Browser are much happier dealing with HTML.
- haukur 10y agoYou can convert a component to static markup with react-dom (the same package used to attach the app to the container element).
- JustSomeNobody 10y agoPreference? Maybe they're just plain sick of hearing "Just use React" all the time. That's like saying just use Javascript for everything. Good grief.
- Vinnl 10y agoIt sounds like Vue is easier for the style of teams working at GitLab, where there are designers that mostly do the HTML+CSS.
- al2o3cr 10y agoFor me, the ability to use inline-template to add Vue-powered interactivity to server-rendered HTML is the huge win.
- amirmansour 10y agoThe obligatory read to help with this question: https://vuejs.org/v2/guide/comparison.html https://vuejs.org/v2/guide/comparison.html