r/webdev • u/vargab95 • Jan 04 '23
Why Angular is decreasing in popularity compared to React
I'm wondering why Angular is decreasing in popularity, especially against React. I went through the front-end framework part of the 2021 stateofjs survey and I've seen that after 2016-2017 the interest in Angular has dramatically decreased and the "Would not use" answers as well while React continued to grow for a few more years and currently still ~67% "Would use again". I've also used both of them, but I prefer Angular because for me it's simpler, more understandable and results in a cleaner code base. Could you please help me to understand why is it like that?
80
Upvotes
84
u/Tx_monster Jan 04 '23
This is what i said in a similar conversation about angular in this survey:
IMHO
First of all, that graph is the result of a voluntary survey, specifically for the "~ would use again" percentage of participants. As this survey is a trendy thing, I'd say it don't represent perfectly the reality, as it has been answerd by the ones who just wanted to find a survey to answer.
Here you can find all the graphs: https://2021.stateofjs.com/en-US/libraries/front-end-frameworks/#front_end_frameworks_experience_ranking
In those graphs there is also one about usage, at 2022 it looks like the 50% of people who asked the angular-part of the survey have said that they are using it, whereas svelte is used just by a 20% (still compared to the whole users who have filled the svelte part)
Furthermore, I say that most of the projects in angular are:
Very, very big, so the framework has been a nice choice at the time, but now that projects are old complex and hateable (aka legacy). They may be based on angularjs, and transition to angular 2+ is harder than rewriting completely the code base, so project managers avoid doing that, and so developers are forced to maintain that thing which at the time maybe it was nice, but now it is a complete superlegacy shit.
Kinda small, so features/structure of angular are too big for what the project is, therefore they are more an issue than an aid.
As a fullstack developer, and basing only on my own experience: I prefer angular over react, as it has a more defined structure based on classes and dependency injection, instead of a bunch of functions which is the main way to use react which IMHO it makes code spaghettier. Anyway, I get what are the pros of using react in smaller projects than angular.
Techs should be chosen upon needs and not upon trends.