Angular vs. React vs. Vue
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
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.
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.
As we can see, the most numbers of users are likely to use React and Vue again than Angular.
Reasons to Select 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
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.
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
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.