Angular vs React vs Vue: qué marco elegir en 2020

Translating…

This post is a comprehensive guide on which is perhaps the right solution for you: Angular vs React vs Vue.

Just a couple of years ago, developers were mainly debating on whether they should be using Angular vs React for their projects. But over the course of the last couple of years, we saw a growth of interest in a third player called Vue.js.

If you are a developer starting out on a project and cannot decide on which JavaScript framework to use, this guide should help you make a decision.

We cover various aspects of Angular, Vue, and React to see how they suit your needs. This post is not just a guide on Angular vs React vs Vue but aims to provide a structure to help judge front-end JavaScript frameworks in general. In case a new framework arrives next year, you will know exactly what parameters to look at!

* In this post, we assume that you have basic knowledge of JavaScript and have used JavaScript frameworks as well.

Let’s get started:

Part 1: A brief history of Vue vs React vs Angular

Before we get into the technical details, let’s first talk about the history behind these frameworks – just to better appreciate their philosophy and their evolution over time.

How it all started 🐣

 
\"angular

Angular, developed by Google, was first released in 2010, making it the oldest of the lot. It is a TypeScript-based JavaScript framework. A substantial shift occurred in 2016 on the release of Angular 2 (and the dropping of the “JS” from the original name – AngularJS). Angular 2+ is known as just Angular. Although AngularJS (version 1) still gets updates, we will focus the discussion on Angular. The latest stable version is Angular 10, which was released in June 2020.

 
 
\"vue

Vue, also known as Vue.js, is the youngest member of the group. It was developed by ex-Google employee Evan You in 2014. Over the last three years, Vue has seen a substantial shift in popularity, even though it doesn’t have the backing of a large company. The current stable version is 2.6, released in February 2019 (with some small incremental releases since then). Contributors for Vue are supported by Patreon. Vue 3, currently in the alpha phase, is planning to move to TypeScript.

 
 
\"react

React, developed by Facebook, was initially released in 2013. Facebook uses React extensively in their products (Facebook, Instagram, and WhatsApp). The current stable version is 16.X, released in November 2018 (with smaller incremental updates since then).

 

Here’s a short summary of Angular vs React vs Vue, in terms of their status and history:

The history of Angular vs React vs Vue
Angular React Vue
Initial release 2010 2013 2014
Official site angular.io reactjs.org vuejs.org
Approx. size (KB) 500 100 80
Current version 9 16.x 2.6.x
Used by Google, Wix Facebook, Uber Alibaba, GitLab

License 👮‍♂️

Before you use an open source framework, make sure you go through its license. Interestingly, all three frameworks use the MIT license, which provides limited restrictions on reuse, even in proprietary software. Make sure you know the implications of the license before using any framework or software.

Here is a quick summary of the MIT license in plain English terms.

Popularity 🔥

As “angular” and “react” are common words, it is difficult to grasp their popularity from Google Trends. Though, a good proxy for their popularity is the number of stars that their GitHub repositories get. A sudden shift in the number of stars of Vue occurred in mid-2016 and, recently, Vue has been up there with React among the most popular frameworks.

\"Stars
Number of stars on GitHub projects for Angular, React, and Vue

Let us check how the job market is for Angular vs React vs Vue, which is also a good measure of popularity:

Job market for Angular vs React vs Vue 👷‍♂️

The best sources of data that indicate the trends on the job market are the various job boards.

As seen from the trends of late 2018, the number of jobs that require a skill set of Angular or React is roughly the same, whereas that of Vue was still only a fraction of this number (about 20%).

If you’d like a somewhat more up-to-date analysis, you can try this Google Trends search, which breaks down search trends over the past 12 months for React jobs, Angular jobs, and Vue jobs. The data is embedded below:

Google Trends also breaks it down by geographic location if you’d like to look up the job search trends in your area.

If you are looking strictly from the point of view of the current job market, your best bet is to learn Angular or React. However, given that Vue has gained popularity over the last three years, it may take some time for projects to use Vue, or new projects that adopt Vue to reach a maturity level that commands a higher number of developers.

Part 2: Community and development

Now that you are familiar with the history and recent trends for each of these frameworks, we will look at the community to assess the development of these frameworks. We have already seen that for all of the frameworks, incremental releases have been shipped regularly over the past year, which indicates that development is going on in full swing.

Let us look at Angular vs React vs Vue with respect to statistics on their GitHub repositories:

Angular React Vue
# Watchers 3.2k 6.7k 6.2k
# Stars 62k 151k 166k
# Forks 16.9k 29.4k 25.2k
# Contributors 1,129 1,390 293

When comparing Vue vs React, Vue has a huge number of watchers, stars, and forks. This shows Vue’s popularity among users and its value compared to React. However, the number of contributors for Vue are lower than Angular and React.

One possible explanation is that Vue is driven entirely by the open source community, whereas Angular and React have a significant share of Google and Facebook employees contributing to the repositories.

From the statistics, all three projects show significant development activity, and this is surely going to continue in the future — just these statistics cannot be the basis of not deciding to use either of them.

An additional metric that you’ll want to consider is GitHub’s “Used By” badge, which needs to be enabled by the repository author. This shows how many other repositories on GitHub are dependent on that repository. Angular’s GitHub repo hasn’t enabled this feature yet, but React currently shows almost 4,000,000 while Vue shows over 93,000. Quite a difference between the two, but this is largely due to Vue being the newer framework and doesn’t tell the full picture on overall demand.

Part 3: Migrations

As you’re working with your framework of choice, you don’t want to have to worry about a framework update coming along and messing up your code. Though in most cases you won’t encounter many issues from one version to another, it’s important to keep your finger on the pulse because some updates can be more significant and require tweaks to keep things compatible.

Angular plans major updates every six months. There is also a period of another six months before any major APIs are deprecated, which gives you the time of two release cycles (one year) to make necessary changes if any.

When it comes to Angular vs React, Facebook has stated that stability is of utmost importance to them, as huge companies like Twitter and Airbnb use React. Upgrades through versions are generally the easiest in React, with scripts such as react-codemod helping you to migrate.

In the Migration section of the FAQ, Vue mentions that 90% of the API is the same if you are migrating from 1.x to 2. There is a migration helper tool that works on the console to assess the status of your app.

Part 4: Working with Vue vs Angular vs React

There are a handful of important characteristics to look at here, chief of them being overall size and load times, the components available, and learning curve.

Size and load times ⏲️

The sizes of the libraries are as follows:

  • Angular 4+: Depends on the bundle size produced
  • React: 116 KB
  • Vue: 91 KB

Although there can be a significant difference between the sizes of the frameworks, they are still small as compared to the average webpage size (about 2MB according to the most recent data). Additionally, if you use a popular CDN to load these libraries, it is highly probable that a user has the library already loaded in their local system.

Components 🏗️

Components are integral parts of all three frameworks, no matter if we’re talking Vue, React, or Angular. A component generally gets an input, and changes behavior based on it. This behavior change generally manifests as a change in the UI of some part of the page. The use of components makes it easy to reuse code. A component may be a cart on an e-commerce site or a login box on a social network.

\"Angular\" Angular:
In Angular, components are referred to as directives. Directives are just markers on DOM elements, which Angular can track and attach specific behavior too. Therefore, Angular separates the UI part of components as attributes of HTML tags, and their behaviors in the form of JavaScript code. This is what sets it apart when looking at Angular vs React.
\"React\" React:
React, interestingly, combines the UI and behavior of components. For instance, here is the code to create a hello world component in React. In React, the same part of the code is responsible for creating a UI element and dictating its behavior.
\"Vue\" Vue:
When looking into Vue vs React, in Vue, UI and behavior are also a part of components, which makes things more intuitive. Also, Vue is highly customizable, which allows you to combine the UI and behavior of components from within a script. Further, you can also use pre-processors in Vue rather than CSS, which is a great functionality. Vue is great when it comes to integration with other libraries, like Bootstrap.

To compare how the same app looks with different libraries, here is a great post on creating the same to do list app on React and Vue and contrasting the differences of the two frameworks.

Learning curve 🎓

So how difficult is it to learn each of these frameworks?

\"Angular\" Angular:
Angular has a steep learning curve, considering it is a complete solution, and mastering Angular requires you to learn associated concepts like TypeScript and MVC. Even though it takes time to learn Angular, the investment pays dividends in terms of understanding how the front end works.
\"react\" React:
React offers a Getting Started guide that should help one set up React in about an hour. The documentation is thorough and complete, with solutions to common issues already present on Stack Overflow. React is not a complete framework and advanced features require the use of third-party libraries. This makes the learning curve of the core framework not so steep but depends on the path you take with additional functionality. However, learning to use React does not necessarily mean that you are using the best practices.
\"vue\" Vue:
Vue provides higher customizability and hence is easier to learn than Angular or React. Further, Vue has an overlap with Angular and React with respect to their functionality like the use of components. Hence, the transition to Vue from either of the two is an easy option. However, simplicity and flexibility of Vue is a double-edged sword — it allows poor code, making it difficult to debug and test.

Although Angular, React and Vue have a significant learning curve, their uses upon mastery are limitless. For instance, you can integrate Angular and React with WordPress and WooCommerce to create progressive web apps.

Angular vs React vs Vue: Who wins?

Towards the end of this post, let us recall the characteristic features of each framework to try to answer the question: Angular vs React vs Vue: which one should you choose?

\"angular Angular is the most mature of the frameworks, has good backing in terms of contributors and is a complete package.

However, the learning curve is steep and concepts of development in Angular may put off new developers.

Angular is a good choice for companies with large teams and developers who already use TypeScript.

Extra 👉 Here are some Angular admin dashboard templates that you might be interested in.

\"react React is just old enough to be mature and has a huge number of contributions from the community. It has gained widespread acceptance. The job market for React is really good, and the future for this framework looks bright.

React looks like a good choice for someone getting started with front-end JavaScript frameworks, startups and developers who like some flexibility. The ability to integrate with other frameworks seamlessly gives it a great advantage for those who would like some flexibility in their code.

class = \»su-note\» id = \»\» style = \»border-color: # e2e2e2; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;\»>

Vue es lo más nuevo en la arena, sin el respaldo de una empresa importante.

Sin embargo, le ha ido muy bien en los últimos años para convertirse en un fuerte competidor de Angular y React. Esto quizás esté jugando un papel con muchos gigantes chinos como Alibaba y Baidu que eligen Vue como su marco principal de JavaScript de front-end.

Sin embargo, queda por ver cómo funcionará en el futuro y se justifica ser cauteloso con él. Vue debe ser su elección si prefiere la simplicidad, pero también la flexibilidad.

Extra 👉 Aquí hay algunas plantillas de administración de Vue creadas con Bootstrap que podría interesarle.

La respuesta al debate de Angular vs React vs Vue es que no hay una elección correcta absoluta, una conclusión que probablemente esperabas.

Cada una de estas bibliotecas tiene sus propias ventajas e inconvenientes. Según el proyecto en el que esté trabajando y sus requisitos individuales, uno de estos será más adecuado que los demás. Siempre es clave hacer su propia investigación antes de tomar una decisión, especialmente si va a trabajar en una empresa comercial y no en un proyecto personal.

¿Qué marco crees que es el ganador aquí: Angular vs React vs Vue? Háganos saber en los comentarios a continuación.

< div class = \"su-spoiler-title\" tabindex = \"0\" role = \"button\"> (VIDEO): Complementos de WordPress imprescindibles para desarrolladores

En otra nota, ¿qué tal si usas WordPress un poco más? WordPress es perfectamente adecuado para ejecutar casi cualquier proyecto de sitio web imaginable, y hay algunos temas increíbles disponibles para que su diseño se vea genial (muchos de estos los temas se pueden descargar gratis ). Sin mencionar que puede alojar un sitio web de WordPress más barato .

No olvide unirse a nuestro curso intensivo sobre cómo acelerar su sitio de WordPress. Con algunas correcciones sencillas, puede reducir su tiempo de carga hasta en un 50-80%:

Diseño y presentación de Karol K.