Using Vue vs React

The Future of Frontend Development.

Minura Samaranayake
Frontend Weekly
7 min readFeb 17, 2021

--

Vue.js and React.js are two popular frontend (FE) JavaScript frameworks among web developers worldwide at present, of which React.js has been able to secure the top spot in the Frontend Framework Rankings for three consecutive years. These frameworks furnish a great approach towards web applications. Each framework has its own merits and demerits depending on the nature and the requirements of the web application of interest. In this write-up, we intend to discuss the strengths and weaknesses of Vue.js and React.js, and also what the future holds for both in FE Development.

Dealmakers

Before we dig deep into the topic, let’s discuss some of the common features that make React and Vue more eminent and demanding among developers.

Virtual DOM (Document Object Model) — is a programming concept where an ideal/virtual representation of a User Interface (UI) is stored in local memory and synced with the ‘real’ DOM by a library. Instead of rendering the whole page, React and Vue update only those objects that have changed, saving time and resources that heavy DOM manipulations consume.

Component-based UI creation —The substantial library components of Vue and React encourage code reuse, increase the productivity of developers, and speed up the process of development.

Library for building mobile apps — In Vue, the developers had to wait for a long time for mobile app compatibility, but now assisted by both tools.

Focus on the view library — separate concerns for routing, state management, etc.

Background

In order to meet the needs of the tech giant Facebook, React was developed and continues to be maintained by them. And there were concerns about the license of React in the past; currently, however, the tool operates under the MIT License as an open-source software. Having such corporate aid, especially from Facebook, React indicates a stable future for its growth.

Looking at Vue, which was built by a single developer, Evan You from China, wanted to improve the features which made writing Web apps faster, easier, and more pleasant.

“Vue solves a very focused, limited set of problems. Compared to React, Vue puts a bit more focus on approachability. Making sure people who know basics such as HTML, JavaScript, and CSS can pick it up as fast as possible.” -Evan You-

From the beginning, Vue was a genuinely open source project, relying on going forward with the community, contributors, and crowdfunding.

Syntax

Between React and Vue the prominent dissimilarity is that Vue is a standalone framework and React has to be used together with other libraries. Vue uses HTML templates by default, but there’s an option for writing in JavaScript Expressions (JSX). There’s solely JSX used in React.

The conventional separation of Vue’s issues into HTML, CSS, and JS makes it easier to learn how to build Web applications even for inexperienced frontend developers. For most Web designers, HTML templates are also familiar and thus enable collaboration between developers and designers.

JSX of React combines HTML and CSS together into JavaScript. Components written by various developers can work well together. It is important to us that without causing rippling modifications across the codebase, you should be able to add functionality to a component.

Ecosystem

React relies on routing and state control on external solutions such as Flux/Redux. These frameworks simplify debugging by providing a single way of changing the state. Facebook leaves React-Redux and React-router management to the development community, which contributes to a more divided ecosystem.

Vue has a few companion libraries. And also it is already bundled with the functionalities which in React, would require you to use a library. For state management in larger applications, you would need an external library. Like Redux, it has only one way to change the state by using handler functions called mutations.

Availability of talent and Demand in the job market

Even though Vue is easy to learn, there are remarkably more React-oriented developers on the market. So if a company is hiring a developer for a business needing a complex app, hiring an experienced React developer who could step into the project right away will be their first choice.

It was stated that React is the demanding framework among developers than Vue.js in State of JavaScript 2020.

State of JavaScript 2020

HackerRank’s 2020 Developer Skills Report revealed that the developer knowledge of these frameworks is high, with Vue.js having a rise in demand.

Developer Skills Report 2020

Perception of Developers about the Technologies

When we go over React and Vue, developers have their own views about these two which would help others to decide between the two in the future.

What Developers really loves about Vue.js

  • Newbie-friendly
  • Better documentation
  • Easy updates
  • GUI availability
  • Robust community

about React.js

  • Elegant programming style and patterns
  • Robust community
  • Rich ecosystem

After reaching the top spot in the most used web framework list in the 2020 Stack Overflow Survey, it continues to be the second most common framework, with 36.8 percent of respondents choosing React and Vue at 7th. We can expect Vue’s growth in the following years, given its steadily growing popularity.

Web frameworks used most often. Source: Stack Overflow Survey

In the Stack Overflow 2020 report, both React and Vue were classified as the most loved web frameworks, with Vue only falling by less than 3 percent to the second position.

Web Apps Made with Vue.js and React

Many globally renowned providers and applications make use of both Vue and React.

Companies that use Vue:

  • Grammarly
  • 9GAG
  • Behance
  • Laravel Spark
  • Gitlab
  • Nintendo
  • EuroNews
  • Buzzfeed

Companies that use React:

  • Bloomberg
  • Facebook
  • UberEats
  • Airbnb
  • Discord
  • Instagram
  • Skype
  • Pinterest
  • Walmart
  • Wix

And the list goes on.

Conclusion

For almost every company hoping for long-term success, mobile app creation these days is a given. But the age-old question is whether to make use of Vue or React? Which would be beneficial for the future of the website?

  • For creating interactive user interfaces, Vue and React are both fantastic tools. You have to take a range of considerations into account to choose which one is best for your next project, including the use case, your business needs, environment, availability of developers, budget, and the timeline you are dealing with.
  • Vue is easy to read, lightweight, and fun to write in. The integration or migration of existing projects to Vue is quicker and easier due to its familiar template syntax and use of components. Vue.js is ideal for startups for that purpose but can be used as well in large-scale applications.
  • Vue, performance-wise, is on par with React. Final outcomes, however, rely essentially on optimization efforts and application scale. The documentation is outstanding, describing it in minute detail.
  • On the other side, React is perfect for developing complex enterprise-grade applications, with corporate support, a wide community, and an even larger ecosystem. The job market is also booming with seasoned developers from React, so you won’t find yourself short of specialists.
  • Vue 3.0 was released in 2020 September. One of the most significant changes is a new API that will allow for a function-based way of the writing component, which was inspired by React Hooks. This actually changes the way we use Vue. However, it won’t break anything in Vue 2.x applications, as Vue 3 is still 100% compatible with the current syntax / the options-based API. I think that the Composition API will bring us a lot of flexibility, and lead to better-structured code as well as scalability.

Changes in Vue 3

Virtual DOM rewrite for better performance and improved TypeScript support

Native portals — now called Teleport

Fragments (virtual elements that won’t be rendered in the DOM tree)

More flexibility for global mounting

Conditional suspending of component rendering

The React 17 release is odd since no new developer-facing features are added to it. This release, instead, focuses primarily on making it easier to improve React itself.

Changes in React 17

React 17 enables gradual React upgrades.

Event Delegation

Aligning with Browsers

No Event Pooling

Effect Cleanup Timing

My personal opinion is that these two technologies would make a huge difference in the near future. The FE web development would be darn easy for developers to integrate with other stacks of tech. With the backend compatibility of React and Vue with almost all backend technologies, it would be much beneficial for developers.

--

--

Minura Samaranayake
Frontend Weekly

Tech Enthusiast | Reading for Masters in Electrical Engineering | South Dakota State University | Department of Electrical and Computer Engineering