ReactJS pros:
ReactJS cons: -Requires the manual processing of data changes -Requires more code in some cases -View oriented (According cleveroad.com/blog/react-vs-angular-ultimate-perf…)
I maintain a database of the pros and cons of things to make it easier for people to understand the differences. It doesn't have VueJS yet but if you would like to help people understand it, please go here and do a questionnaire for it.
You can checkout the database here
(Just putting some of my comments into its own entry)
There is a common misconception about Vue: that it's only for simple stuff. No. The underlying development model of data-driven views and interface composed of component trees is almost identical between React and Vue. The main difference is how the API is exposed and how React leans toward a more everything-in-JS approach while Vue embraces HTML/CSS/JS as what they are.
When you go beyond the basics, the concepts involved in how to structure and maintain state in large, complex applications are not tied to a specific view-layer. For example, you can use Redux with either React or Vue. Both would work. If you can build complex stuff with React, you can do that with Vue too. I'd even claim that anything that can be built in React can be built in Vue with similar if not less amount of time and effort.
Well, Vue isn't opinionated on how you manage your state, nor does React itself. You need to realize that the preference of leveraging immutable data is what the React community has been pushing for, but not something baked into React. That's why there needs to be Flux (and its 1024 different implementations). If Facebook didn't promote Flux as the go-to pattern for building larger React apps, I bet a ton of people would still be using setState() everywhere today - which is essentially mutable state inside the component.
On the other hand, Flux patterns can be applied to Vue too. Vue components do not own the state - they simply observe an external plain state object. Optimizely has been using NuclearJS (their Flux variant) with Vue since Vue's early days. Redux, the currently most popular Flux variant, is also view-layer agnostic. You can use it with Vue no problem, because you can build your Vue components as dumb, purely prop-based ones and just shove a new state tree from the root. Granted you need a bit more discipline (e.g. not mutating state retrieved from stores), but similarly in Redux you need to refrain from mutating state in reducers too. If you want to go the immutable way, it's just something you have to enforce as a rule. The general claim that "React makes your state easier to reason about" is superficial and not addressing what actually contributes to it, and in my opinion shows how many people are just chasing the latest fad without really understanding the details.
If you are interested in enterprise usage, sure Vue doesn't have super high profile usage in US like React does, but it's used in production by some of the most dominant Chinese tech companies: Alibaba, Baidu, Sina Weibo, Xiaomi... in particular, Alibaba used Vue for its mobile channels during the Singles' Day sale (think Amazon during Black Friday).
Nope. In terms of performance, Vue is a bit slower than React for startup but has better runtime performance and is easier to optimize for than React. There are some simple benchmarks out there, but if you are really interested into the details, listen to this JavaScript Jabber episode - the performance parts are near the end.
You need server-side Rendering. If you are not using Node.js then this can't be done anyway. But the cases where you really need SSR is fewer than you think, and it comes with tradeoffs. Read this article for more details
You want to reuse the same codebase for all 3 clients via ReactNative. This is a very compelling reason and Vue doesn't address that at all. But again, it only matters when you need this.
@DanJavia I just want to step in, though I don't usually feel I have anything to add.
React and Vue are very different ways of solving the same problem. From my looking at Vue.js it is a very different model of solving the UI problem. It's 'reactive' in a different way that React. I'll explain more below (based on my short lived impression.) Vue looks like Blaze which is Meteors templating engine (which I believe can be used on it's own). meteor.com/blaze
React tries to bridge the gap between Functional Reactive Programming and normal Javascript - which is good. It aims to reduce the amount of 'touching the dom' that is done, and it aims to be traceable and easy to reason about. My bold claim: This just can't happen when you can change state whenever, wherever - which is what Blaze and Vue enable.
Vue doesn't have that as a goal, I'd be interested in hearing Evan respond if he's interested. I think one of the main pulls of reactive programming is 'it just works' and it responds to data changes immediately. I believe this requires 2 way data binding which can be slow, which Evan disagrees with - but either way he can't argue that it's harder to debug and reason about.
After all that, my issue with Vue is: why would I use it over Meteor? - Reactivity is great, but you have to define a good enough API which also supports it. Meteor is tightly coupled to it's UI framework (for good reason), and the best non-coupled frameworks I've seen are Falcor, and Relay (for reactive programming). Both are Node JS frameworks - so why not just go with Meteor, take advantage of it automatically making your Javascript Asyncronous and take advantage of it's write once run everywhere model of programming.
Or have an easy to reason about front end, using react and some version of flux (because once you understand the paradigm it is the right way to go). Then use some API you create, or use Relay or falcor to do the server fetching.
React has a lot of awesome optimization that most people don't know about. You are not comparing apples to apples by looking at the library size. React is as battle proven as any framework, Facebook and Netflix are using for (I believe) all their front ends. Vue isn't. To be convinced Vue is a good model, I'd need to see:
* Some perf testing between Vue.js and React with very large Dom trees > 10,000 elements, both with few changes and with lots of changes
* Specific use cases it can handle - which are not fixed better by meteor
Let me finish with a thank you to Evan, I really appreciate you putting time into building a cool framework - I really am not trying to put you down. I'm just coming at this from my personal point of view - if you have some suggestions with better ways to critique let me know :-)
Thanks for the A2A . Thanks Evan for coming and commenting here . I've been following Vue from a long time , the bug fixes are very quick , community is very good and it can do whatever Reactjs can and it has a simpler API . You can use RxJS(vue-rx) and flux(vuex) with Vue .
Both are equally capable of doing everything , try both a little and see which one you like more.
@Richard, thanks for inviting me to participate in the discussion. I have unfortunately not used either frameworks / libraries.
From the looks of it, both does the same thing, just differently.
Well it depends, on how much UI stuff you have going on. VueJS is pretty cool, fast and easy. But for more complex UIs I would prefer react.
Mobilunity
Mobilunity offers the best in Ukrainian Development, results-driven Western Management, and successful Global Delivery of dedicated teams.
React has a lot of advantages in the combination with Laravel, because it is highly supported by developers and has established additional routers, meanwhile Vue.js is kind of old-fashioned and barely makes progress to catch up with React. It is very simple and convenient for usage. For example, Laravel PHP developers in our company use mostly React and are completely satisfied with it.