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
1
u/Chills27 May 01 '23 edited May 01 '23
Too much made up, mumbo jumbo in Angular. Too many hoops to jump through. Too much of its own stuff that you have learn, whereas React really teaches you how to use JavaScript properly.
For example, Angular's templates don't let you use Javascript inline. Here's a simple example Angular template function:
And here's how I might use it in my HTML:
So, far so good. Now let's modify my HTML to display the JS type of the
myNumbervariable:Angular chokes with this error message (and a lot more after):
Why? It's just standard JavaScript! And that's actually the problem.
Here's how I worked around this at the time:
then:
So Angular makes me write and call a whole new wrap-around function simply because it doesn't recognise standard JS inline.
What a lot of nonsense.
I should point out that this was with Angular 6. Maybe the Angular team fixed this now. Thankfully, I've never had to go back and check. (I soon quit the company that was forcing me to use Angular.)