4 min read

Before I begin, one thing that needs to be established, is we can’t for a second ignore the fact that we are going to compare two different JavaScript frameworks – React and Vue. Both frameworks are clearly different in terms of popularity and usage. While ReactJS is a JavaScript library, great for building huge web applications where data can be updated on a regular basis. Vue.js is a JavaScript framework, fit for creating highly adaptable user interfaces and sophisticated Single-page applications.

On the other hand, we all have mostly come across is how React and Vue are similar in their fundamental approach. They both have a virtual DOM based approach; they both have component based structure and are Reactive in their architecture. They both tend to work around a root library with all the other tasks transferred to other libraries.

Having said that, as per npm trends report, React stands well ahead in terms of monthly downloads at 2.4 million whereas Vue stands joint second with Angular at around 239k downloads. Now that we have established the popularity of front end web development frameworks, it’s time to talk about what works and what doesn’t in React and Vue.js.

Comparing React.js and Vue.js

Template vs JSX

While everything in React is a JavaScript code written in JSX syntax, Vue depends majorly on its templates which are HTML5 and CSS3 based. Now if you are a front end developer how can this possibly affect you? Well it depends on your choice of working methodology. If you want to write code on your own and control every aspect of your application, then the React way will be much more suitable for you. But if you want to start working on a readymade template and then add features as you go then Vue should be your best choice.

React is a better framework if you want to scale up

Make no mistake about this. The size and scalability of your application plays a determining role on your choice of framework. The fact that React gives you more control over your application architecture is the single most reason why it is easier in React to scale up your application. But since Vue is so much dependent inherently on the templating structure, it becomes tough when to build an industrial grade application made with Vue as changing the template can be difficult.

It’s easier to update data with Vue than React

Updating data on Vue is much simpler. The middle stage of transpiling is not needed in Vue as it directly renders into the browser and hence the process is faster. Whereas in React, the data is analyzed, then stored, then the Document Object Model (DOM) is invoked and thereafter the change takes place, which is a time consuming process.

React has a bigger community than Vue

React is backed by Facebook. There are many similar libraries like React such as Preact which render support to React making it a  larger community than Vue. And with larger communities developers can expect faster resolution of issues and regular community support with timely updates.

Building for mobile with React and Vue

The capabilities of all modern day frameworks are often judged in terms of how they allow developers build for mobile.

React has a world class companion in this domain: React Native. React Native is very similar to React in terms of its component structure, and is a fairly short learning curve for anyone already using React.

The introduction of Vue Native, which offers a way of writing mobile applications with NativeScript using Vue, has made it easier for mobile developers to use Vue mobile development. Chinese tech company Alibaba has also created a cross platform framework called Weex.

Weex has support for Vue, and while it doesn’t yet have the capabilities of React Native, it could be a mobile framework to watch.

Which is better? React or Vue?

To summarize, there are different aspects of Vue and React which are useful and developer friendly. However if you intend to judge them on your own, you are better off assessing what your development needs are first? How big an issue scalability is going to be? Would you be needing something for the mobile platform too? Once you have figured out these questions, the choice should be easy.

Read Next:

What is React.js and how does it work

Is React Native really a Native framework

Using React Router for Client Side Redirecting

2 COMMENTS

  1. Useful content shared at right time as what to choose React or Vue is burning question among developers and learners. Comparison provided here will become helpful source in decision making for selecting one framework. I would also like to share one ref resource I just came across with the intention to help your readers https://medium.com/@SPEC_INDIA/comparison-of-popular-frameworks-reactjs-vs-vue-js-detailed-db89fe621a66 This content provided detailed comparison with quick comparison table at the end of the content.

  2. I have some problems with a few parts of this article. First, I have about a year of production experience with both React and Vue, so I’m in a valid position to compare without bias. I started off learning React outside of work but then our development team decided to go with Vue because of the good fit for our existing SPA for a few reasons. Honestly we could have gone with React and been fine, both options are great. So I was forced to learn Vue, but I continued learning and using React for side projects. Here is the truth, most developers will not spend as much time with both frameworks as I have, what I see more often is whichever framework they learn first, they stick with and will not even be open to trying the other, it has turned in to some kind of cult war on both sides I’m sorry to say.
    The reality is they are both awesome awesome options, they have very similar approaches to solving the JavaScript client-side architecture problem that us JS devs have been dealing with for years. We are lucky that the community has finally settled on just two options instead of 20 plus. Yes there are syntax differences and a few other differences but a good developer will be able to build any scalable application with either choice.

    When the author says “The fact that React gives you more control over your application architecture is the single most reason why it is easier in React to scale up your application”. First of all please, if you are going to publish something and be taken seriously, check your grammar, use Grammerly or whatever! Back to what’s important: What are you talking about “control over your application”? You have the same control over your app regardless of whether or not you use templates or pure JS element creation. Both approaches are 100% scalable. There is nothing about templating that makes an application more difficult to scale.

    On the flip side “It’s easier to update data with Vue than React” – um not really. The persistence process in Vue is a little more direct and simpler, but that’s all under the hood, the shadow DOM implementations are also different but again it makes no difference for the developer. I have never had to update data in React and thought “wow this is so much easier in Vue”, it comes down to how well you have built your application. I think a lot of developers really don’t know how to build robust, scalable and innovative applications, so they blame that shortcoming on whatever framework they are using.
    Not mentioned in this article but something I’ve seen a lot from “react-leaning” developers is “Vue is easier to learn but React is more powerful” and I can tell you that is garbage. Vue is JUST as powerful as React, guys, they are thin view-layer frameworks, there is SO much more involved in your application than React or Vue. Vue may seem a little easier to learn because the templating approach is familiar, but I personally had no problem learning React, in fact it was a pleasure learning both frameworks, they are both intuitive and well-thought out and they are both getting better ever week.

    Listen developers, get over this whole React or Vue thing and GET ON with your project, the view-layer is important but there are other equally important pieces of your app that you need to figure out. For example, how are your modules going to communicate? Pub/Sub? If so what approach are you going to take? What are you using for auth? What about middle tier, are you going REST? What about GraphQL? There are hundred other important things that I haven’t mentioned, so I think to summarize, here is my advise. Spend 30 days learning each framework, force yourself to do it. Build the same app in both and see which one you prefer, I ended up having to make a choice and you will to, but be warned, they are BOTH great so it almost doesn’t matter which one you choose, you are going to win if you do it right. Keep up the good fight people!

LEAVE A REPLY

Please enter your comment!
Please enter your name here