Both React and Vue have gained a lot of attention and interest from the developer's community for the past 3 years. Although their technical nature is slightly different, they are often compared to each other due to a similar set of features making them compete in web development market.
React was created by the social media giant - Facebook - and published in March 2013. It allows developers to create large web-applications that can change the data over time with no need to reload the page itself. If you need an example of how it works just look at Facebook :) React aims to provide reliability, scalability, and simplicity.
Talking about coding it’s worth mentioning that both React and Vue support TypeScript and Flow.
There are many extensive development tools available for Vue and React as well as resources and guidelines to make coding more productive.
As you can see, when it comes to features, Vue and React are quite similar. What are the differences?
Neither React or Vue are opinionated - both of them are highly customizable.
Typically, Vue takes less code than React - This factor makes the development process shorter resulting in saving both time and money. Here’s an example of Two-way data binding in Vue and React.
Vue is perfect for small and performant applications. Its development team shared a very interesting 3rd party benchmark conducted by rawgit.com. It shows the advantage of using Vue - in almost every case React appears to be slower than Vue.
As we mentioned before, both React and Vue.js use virtual DOM, however in Vue.js it is much faster and performant than in React. Evan You, the founder of Vue.js, paid close attention to well-known DOM’s performant issues. He stated, “Vue 2.0 tackles this problem by combining virtual DOM with its reactive dependency tracking system, thus the system can automatically and efficiently determine when and what to re-render, freeing the developer from unnecessary optimization work.” Keep in mind that these facts are relevant only in edge cases when your app needs to be very fast. Normally, you shouldn’t be bothered by the tool’s performance because most of the apps don’t need to do operations like Creating rows routinely.
Another “performance-based” factor that may matter in your project is the size of the library. Depending on what your app’s target Internet connection is, you may have to optimize your product to easier get to the larger audience.
To get similar features to Vue in React you need React DOM (37.4Kb) and React with Add-ons library (11.4 Kb) which totals at 48.8 Kb. Vue’s library is only 25.6 Kb - almost half the React size. This data varies on the version of these Libraries, but as you can see Vue is more “slow-connection” friendly than React.
Vue’s team isn’t far behind. With the very similar philosophy in mind, they’ve partnered with the Chinese e-commerce giant - Alibaba - and created Weex. Developers can leverage their existing knowledge of VueJS to build native apps for iOS, Android, and the Web.
Let’s start with NPM downloads chart. According to the statistics from npmcharts.com, it is very clear who’s the winner here. React has reached a milestone of 1.7M NPM downloads in November of 2017 alone. Judging by a number of downloads from the past few months we can see that this number is only going to get bigger. Meanwhile, Vue’s downloads are not as impressive as React’s - a little over 200,000.
Next up - StackOverflow. The case here is very similar. The percentage of questions tagged with “ReactJS” is over 4 times higher than “VueJS” showing that the interest in React has been growing much faster, especially throughout 2017.
According to bestof.js.org, React has gained much more popularity than Vue.js among GitHub community. There are over 1,100 contributors working on React, which gained almost 81,000 stars on the service. Even though a number of people working on Vue.js is significantly lower - 152 - the project managed to gain over 73,000 stars.
React’s ecosystem is huge, extremely flexible and has a lot of packages to choose from. To help you decide what technology you should choose in your project, you should estimate how big your application is going to be. Typically React is used for complex services - just look at Facebook, Instagram, New York Times, Codeacademy. If you that’s what you’ve been looking for, you should definitely go with React.
On the other hand, if you prefer easy-to-learn, highly performant yet lightweight framework, clean code and working in a small team rather than with a lot of people on something big - go with Vue. At Naturaily, we use Vue for most of our projects, because it better fits our needs.
The decision should always be up to the team because most of the time it is made based on personal preferences of the developers. You will be happy with whatever you choose. Both technologies are awesome.
Jobs at Naturaily