What Will Be the Best JavaScript Framework in 2021?

Angular vs. React vs. Vue

Chameera Dulanga
Aug 7 · 5 min read
Image for post
Image for post
Photo by Jaime Spaniol on Unsplash

Anyone who is starting their career as a developer or a software engineer must have faced a problem with choosing which language, framework, or tools they need to learn first. I’m sure all of you must have faced the same situation. The answer to this question is a bit tricky since there are a large number of languages and frameworks available in the software development industry. I thought of doing a comparison of three JavaScript-based frameworks since JavaScript has become the backbone of most development processes.

I have only chosen Angular, React, and Vue for my comparison. First I will bring some major surveys done in the past months into a single place to see what the trending framework is, and then I will talk about the pros and cons of these three frameworks.


Stack Overflow Survey

Image for post
Image for post
Image source: Stack Overflow

In this survey by Stack Overflow to find what the most popular framework is, React and Angular placed second and third, respectively. Last year, Angular had the lead, rather than React. But still, if we consider the responses from professional developers, Angular is ranked in second place, while React is in third place. Despite the rapid development of Vue, this framework is only at the seventh position in the rating.


NPM Trends

Image for post
Image for post
Image source: NPM Trends

The NPM Trends graph above shows us the number of downloads of each framework overs a period of time. The above screenshot shows the stat over the past year, and we can see React is significantly far ahead of its competitors in this respect. On the other hand, Vue is gradually increasing its number of downloads and currently staying around 1.5 million.

Another feature in NPM Trends is that it shows the data from GitHub as well. In the below screenshot, you can see the number of forks, stars, and issues of each framework.

Image for post
Image for post
Image source: NPM Trends

State of JavaScript

The 2019 State of JavaScript includes another report generation platform on JavaScript, and you can find various kinds of comparisons there. The figure below that I have taken from there shows the responses of the users, whether they will use it again or not, have they heard of the technology, etc.

Image for post
Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/

As we can see, the most numbers of users are likely to use React and Vue again than Angular.


Reasons to Select Angular

Image for post
Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/angular/

For me, Angular was the place where I started my software development journey, and personally I don't regret my decision. In comparison to the other two frameworks, Angular is a bit more mature, and there is a large community build around Angular. Apart from being part of the famous MEAN stack, Angular provides some great features, like two-way data binding, dependency injection, MVC architecture, Angular CLI, TypeScript support, directives, etc.

But with the rise of its competitors like React and Vue, Angular lost its popularity in the last few years. Being a heavyweight framework, not meeting users' expectations with new updates, limited SEO support, and learning difficulties have affected the popularity of Angular drastically. This is why we see Vue and React becoming more preferable choices today. But Angular is still used to support many popular websites and web apps like the Guardian, Upwork, PayPal, and Sony. All of them are major websites, where Angular proves itself well.

Angular is mostly important in cases like the following:

  • Large scale applications
  • If you need a scalable architecture
  • If you prefer TypeScript
  • Creation of real-time applications

Reasons to Select React

Image for post
Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/react/

According to the State of JavaScript, React has been taking first place in all ratings for the third consecutive year. React was released by Facebook in 2013 with the purpose of the division of the user interface into a set of components to simplify the development process. The ability to use it for native development is one of the major advantages of React, while a large community, support from Facebook, and a saturated ecosystem, better performance, reusable components, and SEO friendliness are some other pros.

But sudden updates may have caused a little discussion among developers since they need to update their work to prevent compatible issues. JSX usage and lack of documentation are some other main disadvantages of React.

Usage of React is more appropriate on occasions such as the following:

  • Creating SPA or cross-platform applications
  • Developing small enterprise-level apps

Why Should We Choose Vue?

Vue is a discovery of recent years. It has suddenly turned from the ordinary framework into one of the most loved frameworks among the professionals.

Image for post
Image for post
Image source: https://2019.stateofjs.com/front-end-frameworks/vuejs/

Vue has been growing rapidly due to its tiny framework size, detailed documentation, reactivity, reusability, TypeScript support, and easy learning curve. Vue comes a huge number of special aspects. Some of them can even appear to be cons. For example, Vue is very flexible. However, sometimes it can be overly flexible for teams with a large number of developers.

This framework is in heavy demand in the Asian market today. But there are some cons in using Vue, like its lack of support for large-scale projects and its small community. However, there are some specified cases where Vue might be the best solution for you.

  • To build small and light-weight applications (e.g. Grammarly)
  • To build smart and high-performance applications
  • For an app’s early entry into the market

Conclusion

Based on the above observations, we can conclude that React will be the best framework to learn in 2021, followed by Vue. But there is a high chance of Angular defending second place since it has been there for a longer period of time than Vue, and surely 2021 is not the end of that. So if you are an Angular developer, I suggest you learn React in the upcoming days.


Better Programming

Advice for programmers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store