Piero Borrelli Fullstack developer. Passionate writer and content producer. Lifelong learner.

Angular vs. React vs. Vue.js: Comparing performance

8 min read 2327

Angular Vs. React Vs. Vue.js: Comparing Performance

Editor’s note: This post was last updated on 26 October 2021 to update any outdated information, including framework and platform version updates.

In this ever-changing world of technology, some tools have come to stay, while many others have faded into obscurity over the years. One thing we can all agree on, however, is that the JavaScript programming language is here for the long term.

This amazing piece of technology is loved by millions for its versatility; it can be deployed on both the server side and client side for mobile applications and desktops.

However, JavaScript can be a complex language to learn with its specific syntax and peculiarities. I will admit to having found myself many times looking at a piece of JavaScript code wondering what exactly was happening behind the scenes.

To address the sometimes convoluted nature of JavaScript, frameworks were created.

Frameworks serve as a skeleton for our applications, defining the guidelines and best practices to develop projects while simplifying a lot of factors for us, such as code structure and maintenance.

And while the Angular, React, and Vue frameworks have been around for a while, that doesn’t mean they’ve become obsolete; rather, they remain as some of the most popular frameworks.

In this article, we’ll compare the performance of these three JavaScript-based solutions, and why they’re still among the most important JavaScript frameworks of the last decade.

How do I choose a JavaScript framework?

Very often, whenever you find yourself wondering what framework to use when starting a new project, you might feel tempted to pick one without fully analyzing it. But this can become problematic when you realize that the framework chosen doesn’t meet your application needs.

For instance, if you have a really important project with different bottlenecks, you need a detailed picture of which framework will perform better.

With a quick introduction to each framework and providing you with performance analysis, you can effectively direct your choice and pick the best framework for you.

What is Angular and why is it used?

Angular Logo

In an old, new, and emerging world of frontend JavaScript frameworks, Angular quickly established itself as a mainstream technology used by millions of developers.

This is due not only to an optimal release, but because Angular offers an incredible structure, providing easy two-way data binding, MVC model, a built-in module system, routing package, dependency injection, and other exciting features.



What are the most important features of Angular?

Thanks to its MVC structure, Angular can split tasks into logical chunks, reducing the initial load time of a webpage. The MVC model also allows separation of concerns, with the view part being present on the client side, drastically reducing queries in the background. Also, communication with this tool works in an asynchronous mode, meaning fewer calls to the server are performed.

What are the benefits of Angular?

Angular is very popular and well-used. Because it has traction in developer spaces, many communities and professionals support it.

Angular provides extensive documentation and many built-in features, allowing you to create complex apps without the need for third-party packages.

Also, one of Angular’s best features is two-way data binding, which replicates changes made to the model instantly into the views in an easy, efficient, and intuitive way.

What is the problem with Angular?

A common issue found when using Angular is that it produces heavier applications. Due to the many features of this framework, sometimes they can burden your projects, translating into a heavier application with slower performance compared to React or Vue.

Add new and significant changes that are introduced often and a steep learning curve, developers can face challenges trying to adapt and learn Angular’s many features, making it harder to learn that its counterparts, React and Vue.

What is React and why use it?

React logo

React is a frontend library used to create stateful and reusable UI components for developing large web applications that can change data without reloading a page.

The main mission behind React is to be simple, scalable, and fast. Since it’s a frontend library, React doesn’t implement the MVC template, but you can consider it the view part of it.

What makes React performance faster?

The great advantage of using React is its performance. With a gzipped file size of 34.8KB, this library has quickly become famous for its incredible speed and the many features that make this possible, such as:

  • Using a virtual DOM for maximum efficiency by only re-rendering nodes as needed
  • Support for bundling and tree-shaking to minimize the end user’s resource load
  • Support for server-side rendering (SSR) for performance, search engine visibility, and social sharing

What are the major advantages of React?

By using a virtual DOM, developers can easily increase performance and optimize apps workloads.

Unlike Angular, React’s one-way data binding ensures data flows in one direction when writing React applications, providing developers better control over the full project.

React is also easily testable. When testing components, React monitors the output of actions made, making it more accessible so you can have more control over how the code executes.

What are the cons of React?

As stated in the introduction of this section, React doesn’t implement MVC. This means developers must sometimes use extra libraries to implement state and model.

React’s documentation is also insufficient. Due to the constant updates made to this framework coupled with the creation of all the companion libraries to support it, React technologies accelerate so fast that there is no time to write proper documentation.

And because React constantly changes, developers must regularly get up to date with the new ways to do things within the framework.

What is Vue.js used for?

Vue.js logo

By common definition, Vue.js is a progressive framework for building user interfaces. In contrast to a monolithic framework like Angular, Vue was built to be incrementally adoptable for users.

It’s one of the most-starred JavaScript frameworks on Github thanks to its features, relatively easy learning curve, and ability to create efficient, fast, and sophisticated single-page applications.

Especially when talking about Vue, it’s easier to compare it to React due to their relatively similar mission. Some similarities include the following:

  • They utilize a virtual DOM
  • They use reactive and composable view components
  • They concentrate on the core library, leaving other operations to companion libraries

Vue.js’ general performance

When it comes to performance, Vue is an exceptionally fast tool. At an 22.9KB after gzipping, this technology will probably have a long life ahead of it.

What is Vue.js good for?

With its manageable size and the ability to incrementally adopt parts of its technology, Vue’s overall performance covers a large part of what makes Vue a great tool.

And because it’s easy to learn, unlike other frameworks like Angular, Vue is a great framework for both beginners and longtime professionals. Its documentation has been consistently updated and its easy project integration allows developers to get started using Vue instantly.

What are the disadvantages of Vue.js?

Since Vue is a newer framework, Vue still needs time to grow its community to the size of those backing React or Angular.

And, since it’s relatively new, the wider market has yet to adopt Vue at the same level it has adopted React and Angular. Thus, it may take some time before we see a high demand for new, skilled Vue developers in the job market.

Which is better: Angular, React, or Vue.js?

Now that we’ve quickly reviewed all the frameworks, let’s try to put them side by side to make a proper performance comparison. By the end, you will be able to see when you should use one framework over the other.

The three factors we will analyze are:

  • DOM manipulation determines
  • Startup time
  • Memory allocation

DOM manipulation helps us determine which framework performs better for highly dynamic applications that require a lot of interaction with the DOM, while startup time indicates which framework provides a faster initial load time, useful for applications that require more speed.

And finally, memory allocation determines which framework better operates with the memory — for example, performing bulk operations such as reading or writing thousands of records from a database.

Every color in the images has a specific meaning:

  • Green means the framework performs better than another
  • Red and yellow mean that the given framework performs worse than another

All the tests shown are between the keyed versions of the frameworks, and all time units are expressed in milliseconds.

Performing the benchmarks

All the benchmarks presented below come from Stefan Krause’s excellent analysis. You can find instructions from the Github page to test each framework on your local machine.

Angular, React, and Vue.js DOM manipulation comparison

As you can see from these first stats, Angular tends to perform better when it comes to DOM manipulation, except for a couple of cases where it performs worse. So, generally speaking, Angular performs better when it comes to DOM manipulation.

DOM Manipulation Comparison Showing Benchmarks For Vue, React, And Angular

Angular, React, and Vue.js startup time comparison

As you might have guessed, Vue is the absolute winner for startup time. As mentioned previously, the notably small size of this framework helps startup time decrease tremendously.

We see very similar results for React as well. However, Angular suffers from its heavier structure.

Startup Time Comparison, Showing The Differences Between Vue, React, And Angular

Angular, React, and Vue.js memory allocation comparison

Looking at these stats, we can first see that Angular is definitely slower in these categories compared to Vue and React. The latter two both perform really well, reinforcing the idea that there is no real significant difference between these two frameworks when it comes to performance.

However, if we must declare a winner, that’s still Vue in this case.

Memory Allocation Comparison Of Vue, React, And Angular

Which JavaScript framework should I use?

Now that we have analyzed all the three frameworks through the lens of performance, we can give our verdict. Please keep in mind, however, that whenever you choose a technology based on performance, it’s very hard to find solutions that work for every situation.

Also note that all the tools we talked about generally perform well and are already established technologies for developers.

[H3]Why is Angular needed?

Angular is particularly beneficial for creating apps with very dynamic content and large, enterprise-grade apps.

Because of its structure and efficient data binding, Angular is extremely useful for applications that must change displayed content dynamically based on user behavior. Angular ensures that once a component changes, every other related component linked to it will immediately update.

As for enterprise apps, even if, as mentioned previously, Angular updates itself often and consequently produces a need to frequently update an app’s code, its core structure and tools still make it a great framework for large applications.

Note, however, that when it comes to small-sized static pages, Angular is definitely not the best choice. Due to its monolithic structure, this framework doesn’t work well when producing small, static pages, adding useless overhead and consequently reducing load time and overall performance.

What do I need React for?

Using this well-loved framework can provide many advantages when dealing with apps that need speed, versatility, good SEO, and are accessible for an international audience.

Designed with performance in mind and support for the virtual DOM, React is an excellent framework when you require speed and performance in your application. Its speed and performance are also optimal for enhanced SEO (determined by Google) because of good user experiences.

You can basically use React anywhere without sacrificing performance, allowing you to deploy effortlessly to different platforms thanks to the framework ecosystem with other frameworks like React Native for mobile app development.

And beyond platforms, the need to cater to a global audience and make applications accessible by hardware and internet connections of various speeds and capacities is imperative.

Faster apps that use React can help you bring your product to different parts of the world that may have limited bandwidth or hardware capabilities.

When should you use Vue.js?

This newly created but rapidly establishing framework proves useful for applications that need to be lightweight, fast, integrated into existing apps, and reach an international audience.

As with React, Vue.js applications tend to be extremely fast and can improve your project speed.

But Vue is not only fast, but also incredibly light that can provide better performance for machines with limited resources, improved accessibility for people with slower connections, and a better overall experience for users.

And similar to React, Vue’s speed and lightness give international users with limited internet speed more possibilities to benefit from your application.

To integrate the framework into existing apps, Vue’s inner structure, without sacrificing your application performance. This saves time and money in the long run, making Vue a very efficient tool for startups and growing ideas.

Conclusion

And that’s it for today! This guide should have helped you explore which of the three main JavaScript frameworks is right for you.

Feel free to leave a comment down below; opinions and feedback are extremely useful to help everyone learn better.

For more content like this, follow my Twitter.

Full visibility into production React apps

Debugging React applications can be difficult, especially when users experience issues that are hard to reproduce. If you’re interested in monitoring and tracking Redux state, automatically surfacing JavaScript errors, and tracking slow network requests and component load time, try LogRocket.

LogRocket is like a DVR for web apps, recording literally everything that happens on your React app. Instead of guessing why problems happen, you can aggregate and report on what state your application was in when an issue occurred. LogRocket also monitors your app’s performance, reporting with metrics like client CPU load, client memory usage, and more.

The LogRocket Redux middleware package adds an extra layer of visibility into your user sessions. LogRocket logs all actions and state from your Redux stores.

Modernize how you debug your React apps — .

Experience your Vue apps exactly how a user does

Debugging Vue.js applications can be difficult, especially when there are dozens, if not hundreds of mutations during a user session. If you’re interested in monitoring and tracking Vue mutations for all of your users in production, try LogRocket. https://logrocket.com/signup/

LogRocket is like a DVR for web and mobile apps, recording literally everything that happens in your Vue apps including network requests, JavaScript errors, performance problems, and much more. Instead of guessing why problems happen, you can aggregate and report on what state your application was in when an issue occurred.

The LogRocket Vuex plugin logs Vuex mutations to the LogRocket console, giving you context around what led to an error, and what state the application was in when an issue occurred.

Modernize how you debug your Vue apps - .

Piero Borrelli Fullstack developer. Passionate writer and content producer. Lifelong learner.

29 Replies to “Angular vs. React vs. Vue.js: Comparing performance”

  1. What about KnockoutJS? It’s a library that allpws you to use the MVC pattern along with data binding. Would it be used alongside React?

  2. I prefer angular and Vue over react as react itself has many disadvantages such as React uses JSX which is a barrier. You can say it is the syntax extension that mixes both HTML and JAVA. Moreover pace of development in React is very fast so for the developers like me it’s very difficult to adapt easily the change.

  3. I have used both Angular 2+ and Vuejs to develop my 2 websites.
    My first website was developed with Angular2, had great deep learning curve with it, especially with NGRX involved.
    My second website icyprice.com was developed with Vuejs, with much faster development cycle and better performance.
    I definitely recommend vuejs over Angular. And I’m going to move away from Angular by porting my first website to vuejs.

    You can feel the speed of my website icyprice.com which is developed by vuejs.

  4. I personally like React more than any other web programming language. Simply because it provides more flexibility and ease than Angular or Vue.

  5. As an Angular developer for a long time, I am aware of Angular advantages over React and Vue. I prefer Angular. Thanks for the detailed comparison Piero, I got some great information from your post. Thanks again.

  6. I have discovered if you use Angular’s manual change detection strategy, which isn’t that hard to get use to, the performance gain is exponential for screens with a lot of data like dashboards. It would be interesting to see that row swap benchmark using manual change detection.

  7. We have written a scaffolding tool the implements a full stack angular front end/c# api backend. Originally it implemented this as Vue. On an enterprise business application with 50 to 70 tables and admin table maintenance screens, the angular 10 compiled to 1 meg or less on the front end. The Vue doesn’t compile and is more like the old angular js. The Angular compiler even checks the html views for type safe code. Vue has no code checking.
    There is no contest between Vue and Angular in performance. The Vue pages, of the same enterprise application, scaffolded implementing with Vue is so sluggish, loading just basic test data, that it’s unacceptable and the Vue had to be scrapped and replaced with Angular. The angular 10 performance is superior, and that is with using their out of the box, automatic change detection, not manual change detection.

    1. Hey Randall, we’d be keen to learn more about this. It definitely tracks with some of trends we’ve seen developing in frontend over the last few months. Any chance you’d be interested in writing a post on this for the LogRocket blog? Or even just sharing the tool? Let me know — mangelosanto[at]logrocket[dot]com

  8. Thanks, I wanted some info about Vue.js for a product review based on this technology and your article helped me. I don’t know complex terms but was able to deduce the info.

  9. Vue is more customizable than Angular or React, making it easier to understand. Furthermore, Vue’s features, such as the use of modules, overlaps with that of Angular and React. As a result, switching from one of the two to Vue is easy.

  10. I don’t know how React is good for SEO. It’s a single page app, also Vue is faster and smaller in bundle size.
    Unless you mean to use Next.js, then we are talking about another framework (or meta framework), and don’t forget that Next.js ships a whopping 80KB of data to browser on initial load.

Leave a Reply