React vs. Angular vs. Vue: Which is the Best JavaScript Framework?

Maximilian Schwarzmüller

Udemy for Business instructor

August 29, 2019

When students ask which JavaScript framework to use for frontend website development projects—Angular vs React.js vs Vue.js, I have to admit there’s no perfect answer. Instead, I guide them through the pros and cons of each option. I frame the comparison through each framework’s key features, its industry popularity, and overall performance and developer-side user experience. 

Before diving into the comparison of each web development framework, here’s a quick overview of each option:

Angular

Angular 8 is the latest version of Angular, a JavaScript framework maintained by Google, which is client-side and browser-based. Rather than speaking to a server to reload HTML pages, Angular allows websites to render quickly and efficiently. It’s an all-in-one framework, with built-in tools for routing, state-management solutions, and form validation. Angular is built on TypeScript a superset of JavaScript. 

React.js

Developed and maintained by Facebook, React.js is a popular JavaScript library that focuses on building and rendering components for a web page. With React.js, everything is built in JavaScript and I recommend using it with JSX, a JavaScript syntax extension, that “describes what the UI should look like” in your JavaScript code. 

Unlike Angular, it’s not a complete suite of tools, React.js is comprised of tools that help you build components to be dropped into a page. This allows React.js to be lean, but it does require developers to use additional libraries to include functionalities that React.js lacks. For example, routing is not included in React.js, so that would have to be added manually through third-party tools. 

Vue.js

Vue.js is an open-source JavaScript framework combining features from both React.js and Angular. Unlike React.js and Facebook, Vue.js doesn’t have a large tech company behind its development. It was created by former Google employee, Evan You, who has since amassed a core team that maintains the routing and state management of Vue.js.

Like Angular, Vue.js is a complete framework, albeit with fewer features and packages. Thanks to extensive documentation on Vue.js and the simplicity of its syntax, programmers of all experience levels, even those with a beginner-level of JavaScript and HTML knowledge, should find this framework a straightforward option.

Now, let’s compare these JavaScript frameworks and which might make the most sense for your project based on six criteria:

  • Learning curve
  • Single-page apps
  • Multi-page apps
  • Performance benchmarks
  • Deployment
  • Industry adoption

1. Learning curve

Depending on their background, developers will have varying opinions on which framework is the easiest to learn.

  • Easiest learning curve: Vue.js. In my opinion, Vue.js is the most straightforward framework to learn for most web developers. It’s the closest to HTML and JavaScript basics, so it will feel familiar. Getting started with Vue.js is as simple as adding one import to your HTML document. Vue.js does get more complicated as you build more complex apps. This requires working with .vue files, which require a more complex project setup (though the Vue CLI can make this much easier) and you’ll have to dive into more complex patterns.
  • Steepest learning curve: Angular. Because Angular uses TypeScript, a subset of JavaScript, its learning curve is steep. The components, modules, and syntax you use can look quite different from the JavaScript syntax you’re used to. Angular has a lot of built-in, powerful features, though, which force developers into certain coding patterns that can be quite helpful in building applications. 
  • Medium learning curve: React.js. React.js has what I consider a medium-to-steep learning curve. While it uses an “everything is JavaScript” approach, there are two caveats to React.js. First, is that it works best with ES6 syntax, which can be challenging for a beginner developer. Second is the use of JSX, a syntax hybrid of HTML and JavaScript, not used for typical JavaScript projects. JSX can be difficult at first because it looks like HTML but is still JavaScript, causing some confusion in understanding the code. 

Learning Curve Winner? Vue.js

2. Single-page apps

Single-page Apps (SPAs) are highly reactive, mobile-like web apps with no page reloading wait times. The page is based on a single HTML file while JavaScript controls everything the user sees in the browser. When a button is clicked or a new window appears on the page, no request is made to a server. Instead, the JavaScript code is modified and rendered instantly.

SPAs are popular since they load so fast. Here’s an example: when taking one of my Udemy courses, you can click through the tabs shown below the video player, such as the Q&A tab, without seeing the page refresh. Since JavaScript and the framework run in the browser, there’s no communication needed with the server to display the contents of the Q&A tab, you’ll instantly see it below the video player. 

So how do the three frameworks stack up in relation to building SPAs? Angular was built by Google explicitly for creating SPAs. The use of TypeScript and all of Angular’s built-in tools and services make SPA creation with Angular a great experience for a developer. Tools like routing, state-management solution, and form validation allow for a “straight out of the box” development experience. Using React.js or Vue.js for larger SPAs may bring greater complexities than when using Angular, such as the availability of necessary packages for form support. 

Single-page app winner? Angular

3. Multi-page apps

A multi-page application (MPA) is a “traditional” website such as your favorite ecommerce or media site. Every time the site wants to display new data or send data to a server, a request is sent to the server, which is rendered in the browser. 

React.js works just fine for these projects when used to enhance the page’s existing HTML. You can import React.js to add powerful JavaScript-based components to the page, though it is worth noting that for building React.js components with JSX, you’ll still need some kind of frontend build workflow. Vue.js, though, is very straightforward for use in MPAs. Import the Vue.js library to start incorporating its features and components to your page, no special setup is required. Overall, both Vue.js and React.js do well to add JavaScript functionality to MPAs. 

I consider Vue.js to be a bit better than React.js since you aren’t required to use some special syntax (JSX) that requires a build step (note: JSX is optional, but is the de-facto standard for building React.js components). 

I do not recommend Angular when building an MPA. Angular’s all-in-one approach to components and its use of TypeScript doesn’t make it an ideal framework here. Importing Angular packages into your HTML would be unnecessarily complicated. Trying to compile TypeScript within an HTML-driven app like an MPA will not only impact performance, it’ll be an annoyance to you and your development team. Overall, Angular was developed to help you build SPAs; while it might become a more viable option for MPAs in the future, we’re not there yet.

Multi-page app winner? Tie—React.js, Vue.js

[Help your team learn new JavaScript frameworks. Request a demo to find web development courses right for your project.]

4. Performance benchmarks

Websites with slow load times or lagging performance are a major business risk. Make a customer wait a few minutes for a page to fully render and there’s a good chance they’ve already moved on to your competitor’s site. 

To examine how each framework performs, I reference the JavaScript framework benchmark project on Github. These benchmark results are all relative, though, as each framework is pretty fast. It’s important to note that benchmark tests can be a bit tricky because a framework may perform better than the others in one scenario, but see a different performance in scenarios not accounted for in the benchmark study. 

According to the benchmark project results, as seen in the screenshot below, Angular is slower at startup than React.js and Vue.js. Though Angular is typically a fast framework, it also has a large bundle size. This helps Angular to have faster performance than React.js or Vue.js when used with large apps. React.js and Vue.js shine on smaller apps.

Performance benchmarks winner? None—React.js, Vue.js, and Angular all have good runtime performance.

5. Deployment

How easily will you or your team be able to deploy apps when using these frameworks?

Though the most challenging framework overall for deployment is Angular, if you’re using Angular CLI, the process is actually simple since much of the work is done for you. The CLI handles everything from project creation to code optimization. Upon running a single command, you get a fully optimized, bundled app to deploy to any static host. Turning the app into a universal (server-side pre-rendered app) is also just one command away.

Building and deploying React.js apps is also easy. With create-react-app, you have a tool that generates new, fully pre-configured React.js apps which include everything you need for development and for building your project in the end. With the provided configuration, you also get a fully optimized project which you can deploy to any static host. Unlike the Angular CLI, you can’t add server-side rendering with a single command though.

For Vue.js, you also have a CLI that generates powerful project setups with everything pre-configured. Development is easy and just as with Angular and React.js, you get optimized projects upon running a built-in command. The Vue.js project can be deployed to any static host and turning on server-side rendering (for SEO value) is also fairly easy.

Deployment winner? Angular has a tiny edge but overall all three options are easy to manage and deploy.

6. Industry adoption

In Stack Overflow’s 2019 Developer Survey, React.js and Vue.js were named the first and second most loved web frameworks, respectively. React.js was noted as the second most broadly used web framework across developers, highlighting its demand in the industry. 

As of this writing in August 2019, Indeed.com lists nearly 15,000 jobs requiring React.js skills in the US. There are 13,500 Angular-related jobs and 2,200 Vue.js-related jobs. Of the three frameworks, React.js may be the best skill to prioritize for both engineering team leads and developers wishing to expand their web development skills. 

Industry adoption winner? React.js and Angular

Like every programming language, frameworks and libraries have their own highly debatable lists of pros and cons. When deciding which JavaScript framework to use in a project, I encourage developers and engineering managers to focus on team resources in relation to the comparisons outlined here. Does your team have the bandwidth to learn a more complicated framework? Will they be able to support continued optimizations using that framework? Once you’ve decided which framework is best for your organization’s circumstances, invest in the success of your future apps by ensuring your team has thorough training in these development skills

About the author:

Maximilian Schwarzmüller started learning web development at age 13 and is now a professional web developer and instructor with over 600,000 learners on Udemy. Though he started web development on the backend using PHP with Laravel, NodeJS, and Python), he’s become more frontend developer using modern frameworks like React, Angular or VueJS 2 in projects. He offers nearly 30 web development courses on Udemy.

About Udemy for Business:

Udemy for Business is a learning platform that helps companies stay competitive in today’s rapidly changing workplace by offering fresh, relevant on-demand learning content, curated from the Udemy marketplace. Our mission is to help employees do whatever comes next—whether that’s the next project to do, skill to learn, or role to master. We’d love to partner with you on your employee development needs. Get in touch with us at business@udemy.com

Top 10 Tech and Soft Skills Trending in 2019 thumbnail

Infographic

Based on data from 30+ million learners on Udemy, here are the fastest-growing top 10 tech & soft skills in 2019

More from Tech Skills Topic

Tech Skills

Why Google Cloud Platform is on the Rise

Google Cloud Platform (GCP) is Google’s answer to the hardware and software services that make up cloud computing. As the...

Tech Skills

The Future of Databases: Elasticsearch, Data Lakes, and Time Series

When data professionals ask me how to keep their skill sets competitive, I direct them towards the horizon. How is...

Tech Skills

The Best New iOS 13 Features to Enhance Your Apps

This year’s Worldwide Developers Conference in June saw Apple introduce iOS 13, the latest version of its mobile operating system....