loading...
Cover image for Angular vs Vue vs React: choosing the best framework in 2020
Educative

Angular vs Vue vs React: choosing the best framework in 2020

amandaeducative profile image Amanda Fawcett Originally published at educative.io ・10 min read

Front-end frameworks are growing in popularity as they allow individuals and companies alike to build complex applications in reduced time. These technologies continue to evolve and have revolutionized the world of web development. Today, we will compare three popular front-end technologies: React, Angular, and Vue. Today, we will be breaking down each framework so that you will get a feel of which one feels right for you.

We will cover the following:

Start learning front-end development for free with Educative's COVID scholarship.
Claim your free COVID Scholarship

Introducing the frameworks

If you’re in the world of web development, I’m sure you have heard the terms “front-end” and “back-end.” If not, we’ll go over them quickly. The front-end is all the parts that users interact with and see on the website. The back-end is the “behind the scenes” area that provides business logic and functionality to the site.

As the web has evolved over the years, complexities in how we build web applications continue to grow. Organizations and individuals have developed tools, libraries, and frameworks for others to use that speed up and simplify the development process. A JavaScript framework (or library) helps developers create modern applications called single-page apps (SPA). That’s the case for many front-end JavaScript frameworks like React, Vue, Angular, and more.

Technologies like React, Vue, and Angular offer tools and code that allow users to create powerful web applications without having to do the grunt work. These frameworks significantly cut down development time and decrease the overall headache. So, if you looking to be hired as a front-end developer, it’s vital that you master a front-end framework.

Histories of Vue, React, and Angular

Today, we will be comparing three very popular and most wanted front-end frameworks of 2020: React.js, Vue.js, and Angular. These are some of the most popular frameworks that allow developers to build complex and modern user interfaces on the web. Let's briefly go over their histories.

  • React: React is an open-source JavaScript library built by Facebook in 2013, which uses React internally. React is used by large companies like Facebook, Twitter, Whatsapp, Instagram, Microsoft, Slack, Asana, Airbnb, and more.

  • Angular: Angular was developed by Google in 2010. It’s important to note that Angular is a TypeScript-based JavaScript framework. If you want to read more about TypeScript and how it’s different from JavaScript, check out our TypeScript Tutorial article. In 2016, Google released Angular2, which offered a substantial shift. Angular is used by organizations like The Guardian and Weather.com.

  • Vue: Also also known as Vue.js, Vue is the youngest out of the three. It was developed by ex-Google employee Evan You in 2014 and has increased in popularity over the past few years. Though not as popular as React, it’s still used by large companies like 9Gag, Alibaba, and Gitlab.

Overview of advantages and limitations

Making technology decisions on frameworks can be hard. It’s important to note that there is no best framework. All three have their strengths and weaknesses, and at the end of the day, it comes down to which one best suits you. When determining your framework of choice, you should consider a variety of facotrs that we'll discuss today. However, most importantly of all, choose the one that you like. That being said, let's dive in!

Alt Text

React

Advantages

  • Easy to learn since it is lightweight and offers a simple JS design using a syntax that combines HTML and JavaScript. React also offers great documentation, which is something to consider for initial learners.

  • Fast due to React’s Virtual DOM implementation and rendering optimizations.

  • Top-notch Progressive Web App (PWA) support, especially with its create-react-app template generator.

  • React implements functional programming with components, which allows for reusable code, creating a modularized design. This makes apps easier to maintain and build upon, allowing for complex infrastructure to be more easily developed and scaled.

Limitations

  • React is an incredibly un-opinionated technology, which means that developers have to make their own design choices.

  • React technology is constantly updating, so sometimes it can be difficult to keep with the latest documentation.

  • React uses JSX which can be a learning barrier to some newer developers, though it does have its own benefits,

Alt Text

Angular

Advantages

  • Angular uses TypeScript, which provides great support for type checking and other external tooling.

  • Angular is supported by Google, which means its backed by a dependable organization. They work with detailed documentation and a large community, making it a reliable framework to learn.

  • Angular-language-service allows for autocomplete inside of component external HTML template files, allowing you to speed up your development.

Limitations

  • Angular offers a variety of different structures like Injectables, Components, Pipes, Modules, and more. This makes it harder to learn in comparison to the Vue and React, which focus on the component.

  • Slower performance because it works with the real DOM, though it can be tackled using the ChangeDetectionStrategy, which helps manually control the rendering process.

Alt Text

Vue

Advantages

  • Vue offers detailed documentation, which aids in the already low learning curve for developers. You can make powerful single-page applications just with knowledge of HTML and JavaScript.

  • Vue is used for building single-page applications and more complex web interfaces. Furthermore, Vue applications integrate easily into an existing infrastructure with no negative effect on the system.

  • Vue takes advantage of the virtual DOM, making it faster than Angular. Also, Vue is small, so its speed and flexibility are optimal, allowing for better performance in comparison to the other frameworks.

Limitations

  • Vue offers fewer resources than React and Angular as it is relatively newer and has a smaller market share. This means that knowledge sharing and support are less available.

Framework philosophies

React

React provides a lightweight library to render elements to the DOM and control them in an effective manner. A core functionality of React is building components and sub-components, which you can understand as UI pieces on a web app. React also gives you a bunch of tools that help you better define how you want your components to be rendered. React also offers third-party packages like React Router, a dynamic, client-sized routing library for building SPAs that render without refreshing the browser.

Angular

Angular offers the most functionality of the three frameworks, allowing you to control the user interface, handle user input, validate forms, routing, state management, testing, PWA capabilities, and more. Unlike React, Angular focuses on providing you a full collection of tools to use.

It’s also important to mention that Angular has an official CLI, which makes it easier to manage Angular projects to add dependencies and deploy. Because Angular uses the real DOM, its performance to load a dynamic web application is affected.

Vue

Vue is like a middle ground between Angular and React. It offers more tools than React, but fewer than Angular. It offers built-in state management and router. However, it does not feature HTTP client functionality or form validation. Vue uses the virtual DOM for faster and bug-free performance. Vue focuses on building user interfaces and creating reusable components.

So, who's the winner for philosophy?

There doesn't appear to be a clear-cut winner in this category, as each framework has different pros and cons in terms of frameworks. React does seem to offer more tools and add-ons, but if you don't like working with the virtual DOM, then Angular is the best bet.

Popularity

When considering a framework to use, popularity matters for a few reasons.

  • Finding a job is easier if you know a popular framework, as companies are more likely to use them and seek candidates with relevant experience.

  • Popular frameworks are less likely to disappear or become irrelevant down the line.

  • Popular frameworks are supported by big communities that can produce 3rd party libraries and tools to provide more features.

  • You will also find more help through external documentation and tutorials.

So, we know that Vue, React, and Angular are popular frameworks. But just how popular are they? And which do companies look for on your resume? To answer these questions, I looked at four things to evaluate popularity: Google Trends, NPM downloads, StackOverflow, and common job offerings.

Google Trends

Based on the graph below, it seems that in 2020 React is the most popular worldwide, while Vue and Angular rank similarly. It's important to note that Google Trends searching does not equate usage in the industry, but it does give us a sense of which frameworks are on the rise and which people are more curious about.

Alt Text

Below, if we look at the US specifically, the story is similar, though Vue did not see a rapid drop off in popularity as it did worldwide. While this does seem to suggest that React is the most popular, it simply shows search terms. There are other ways to determine popularity, such as based on actual usage.

Alt Text

NPM Downloads

With NPM downloads, we get a similar story. React gets about 5 times more downloads than Vue or Angular, suggesting that it is more commonly used amongst developers.

Alt Text

StackOverflow survey

The StackOverflow survey tells us a lot about trends and popularity in the market. According to the 2020 StackOverflow survey, React ranks 2nd for most popular framework; Vue ranks 7th for popularity, and Angular ranks 9th. Keep in mind, this includes frameworks of all languages, not just JavaScript. For most wanted frameworks, React ranks 1st, Vue ranks 2nd, and Angular ranks 3rd. Clearly, these frameworks are hot in the market for 2020! On top of that, TypeScript ranks well for the highest salaries worldwide, coming in at $57k annually. The chart below shows the top four most wanted frameworks of the 2020 survey.

Alt Text

Job offerings

Finally, let’s take a look at job offerings. When querying on Indeed in 2020, React appears in around 42k software development job offerings; Angular appears in 10k jobs, and Vue appears in just under 3k jobs available. When searching through Linkedin, the story was the same with React ranking first, followed by Angular and Vue.

What this seems to suggest is that React is the most popular, sought-after front-end framework. In terms of developer popularity, it could be argued that Angular and Vue are at a similar state currently, though Angular has significantly more job offerings in the United States. It should be noted that Vue is incredibly popular in places like China.

So, who is the winner for popularity?

Based on this research, React appears to be the most popular in terms of the market and offerings overall. React seems to be a reliable framework for US developers looking for jobs at big tech companies, and it is the most competitive at the moment. But, as I suggested above, this also largely depends on where you want to work. As you search for career openings in your country, look carefully at tech stacks and job descriptions to see what they expect from a front-end developer.

Syntax

React

React uses JSX, which combines JavaScript with HTML. Just like with TypeScript in Angular applications, JSX gets compiled into regular JavaScript code once you build your project. Here is below code snippet of a Hello World component in React.

import React from "react"

function HelloWorld(props) {
  return <li>Hello World</li>
}

export default HelloWorld

As you can see, you can create components with React through JavaScript functions. JSX is usually something that you either totally love or completely dislike. So, it's vital that you play with React a little before you totally commit to it.

Angular

Angular applications use TypeScript, a superset to JavaScript. Angular projects will compile the TypeScript code into browser-compatible JavaScript code. You can write "components" like this and Angular will take control behind the scenes to manipulate the real DOM. Take a look below.

import { Component } from '@angular/core';

@Component ({
   selector: 'my-app',
   template: `<h1>Hello World</h1>`,
})
export class AppComponent{}

Vue

Unlike React and Angular, Vue uses normal JavaScript. For newcomers, it can be a bit easier to learn because you don't have to learn something completely new like JSX or TypeScript. Below is a snippet of a Hello World app, which may look more familiar to you if you're new to JavaScript.

new Vue({
  el: '#app',
  data: {
    message: 'Hello Vue.js!'
  }
})

So, who is the winner for syntax?

You might be wondering which syntax is the best to work with. The answer is that there is no best syntax - only one that works best with you. For example, some developers love JSX with React. Others really enjoy using TypeScript and Angular's opinionated structure. Some developers are a fan of Vue because you only have to know JavaScript. I suggest you explore each library or framework and choose the one that resonates most with you.

Other factors for consideration

Some other factors you might be wondering that were only briefly mentioned are performance and learning curve.

  • Performance. While performance is a valid concern, you shouldn’t have to worry about it for any of the three frameworks, as they all offer great performance. All three frameworks are fast when using starting time and runtime as metrics. It should be noted that Angular apps are larger than React or Vue apps, but this shouldn't matter unless you working with a very small application.

  • Learning Curve. In terms of the learning curve, Vue is the easiest to learn because it doesn't require any special setup since you simply need to import the Vue Library. Another reason is that it only uses JavaScript and HTML, whereas React and TypeScript require additional Syntax learning for JSX and TypeScript, respectively.

Wrapping up and Resources

Nice job! Now, you should have a good overview of the three popular front-end technologies: React, Angular, and Vue. However, the learning doesn't stop there. It's time to go more in-depth into each framework so that you can determine the one that best suits you. As I mentioned, it's important to play around with each framework before committing to it entirely. Take a look at other projects, source code, and online courses to get some hands-on experience.

Continue Reading

Posted on by:

amandaeducative profile

Amanda Fawcett

@amandaeducative

Content Marketing Manager for Educative, Inc. (she/her)

Educative

Level up on in-demand tech skills - at your own speed. Text-based courses with embedded coding environments help you learn without the fluff.

Discussion

markdown guide
 

Great write up!

IMO, at the end of the day, they all serve the same purpose. Those differences in rendering speed are barely noticeable in 99% of the apps.

We devs tend to pick frontend frameworks mostly based on subjective feelings, familiarity with the tools, popularity, surveys, or whatever we learned in the Bootcamp.

You won't be wrong picking either of them. Just make sure to double down on your choice and become proficient and productive.

 

React is an incredibly un-opinionated technology, which means that developers have to make their own design choices.

I don't really see that as a limitation. Flexibility to design your code the way you see fit isn't always a bad thing. I've seen opinionated frameworks which require a steeper learning curve because they foist their paradigms on to you.

 

Ah! The famous frontend framework war. For me, I like both vue and angular.

I like Vue because

  • It has a simple architecture.
  • And hence, it is easy to learn.
  • It is fast, lightweight.

and sometimes Angular because

  • IMO, angular provides much better organization for large projects.