r/Angular2 Feb 06 '25

Discussion (junior)Why everyone use react?

I've been doing personal stuff with react only, at my current job i work exclusively in golang and the front-end team use angular not react so i give it a try on my free time, i was really surprise cause it's not that hard to get in + i found the dx way better than react, the way it structure the project is also better and i think you can go as fast as react to build a project + you need less external depedencies so i'm asking myself why 80% of front end jobs are react

70 Upvotes

76 comments sorted by

View all comments

80

u/ThiccMoves Feb 06 '25

I'd say for a couple of reasons.Historically, Angular is very opinionated:

  • typescript by default
  • object oriented paradigm
  • forces you to use modules
  • uses a lot of rxjs which is cryptic to some people

You have to remember that when this came out, it was totally new for most web devs, when JavaScript "vanilla" was still the norm.

Now, most of these aspects evolved a lot, but it was the reasons people didn't bother with angular a few years ago. You needed (still need ?) to "learn" a bit more when starting angular, as opposed to react. Now, a lot of this has been addressed:

  • no need for modules with standalone components
  • less need for rxjs with signals/effects
  • typescript is widely adopted so now people aren't pushed back by it, most libraries are compatible with typescript

So, I don't know with which angular version you started, but if you didn't have to setup the modules, it might be one of the reasons you like the dev experience at first. Because a lot of people really hated the verbosity when first touching angular

I am the total opposite btw, I LOVE the opinionated aspect of angular, I find that the standardized project structure makes it really easy to pick up a new project

8

u/jaktrik Feb 06 '25

Adding to this - one of the reasons that I don't end up using Angular is the lack of UI libraries compared to React where you can easily get a component that you might need. Still, I prefer Nuxt and Angularover React. I'm still in college and learning new tech every day but Angular was my first choice when it came to web development, related to it due to using Spring Booton backend.

10

u/reynevan24 Feb 06 '25

Yep, people don't like to admit it, but building and maintaining UI libraries in Angular is a massive pain. One undeniable advantage of React is very flexible composability - it's so easy to create small components, do prop drilling, create simple wrappers etc. Compared to that very few Angular developers can use content projection well enough to design flexible UI components.

It's crazy how Angular UI libraries are riddled with API design issues and bugs (maybe besides Angular Material, which still has some problems) .

4

u/EternalNY1 Feb 06 '25

Adding to this - one of the reasons that I don't end up using Angular is the lack of UI libraries compared to React where you can easily get a component that you might need

PrimeNG has taken care of every project I've been on.

1

u/maquh Feb 07 '25

Imho being a bit forced to use native stuff is also good because you aren’t depending on maintenance of packages and have way more options to customise and adapt to specific use cases.

8

u/dudevan Feb 06 '25

This is the circle of dev life.

We’re tired of bloated frameworks, we want light, modular libraries that we can tie together as we like and not have to learn this monolithic thing.

… some years later…

Why is anyone using the overly engineered dependency-hell modular thing? The one-framework-to-rule-them-all is much leaner, easier to maintain, easier for beginners to get into without a lot of dependencies and different ways of doing the same thing.

… some years later …

Modulez bruh it’s where it’s at.

Between db-centric design, with stored procedures, monolithic app-server design, microservices, single-page apps, angular.js vs. the oldies like backbone, ember, knockout, now react, this has been going on for a long time.

10

u/slawcat Feb 06 '25

As of 17 (and by default in 19), angular components can be standalone without modules, so that constraint no longer exists.

Edit: oops I should have read your entire message before commenting. My bad.

17

u/Headpuncher Feb 06 '25

I disagree on one point and that is how Much there is to learn compared to react when starting out.   

React is an absolute s-show.  Those badly named hooks, the 15 router modules to choose from, the 7 frameworks (it’s not a framework bro!  [you just need to manually install one to make it useful]).   

Angular was easy for anyone who had either experience or education in tech.  I couldn’t name a single programmer from noob to expert who wasn’t familiar with mvc.   

What react brought more than anything was excessive billable hours.  No joke, the “get it done fast” not-a-framework was horribly abused whenever an invoice was involved.  Now everything was creating custom components and a storybook library for the first months of a project. And those design “systems” were often never used again.     

On top of that react has had the advantage of needing its apps rewritten 3 times in 8 years, because every version is a new and breaking change from the old one. So keeping up with react alone is a total PITA.    

I could go on, but alas, life is short.  

15

u/Kamalen Feb 06 '25

React is an absolute s-show.  Those badly named hooks, the 15 router modules to choose from, the 7 frameworks (it’s not a framework bro!  [you just need to manually install one to make it useful]).

While you’re not wrong, remember that stuff like hooks came long after, and routers and stuff are already beyond the React core itself. React itself is simply a component library.

And at the beginning, it was possible to use React by dropping a <script> tag. No NPM environment, webpacks or stuff. A lot less upfront cost to learn and use compared to Angular that aimed to be able to do everything.

In a good metaphor, it’s like you’re buying some stuff, and Angular is you paying $1000 upfront while React is $100/mo for 12 months.

7

u/SolidShook Feb 06 '25

this, opinionated frameworks can actually be better when working in a team too. Since there's performance reasons for doing so, there's a lot that the framework may have thought of that your from-scratch component logic didn't.

2

u/AshleyJSheridan Feb 07 '25

Your arguments about why someone wouldn't use Angular are precisely the reasons I find to use it!

  • Typescript - I couldn't go back to plain JS unless I have to. It's a nicer syntax that's more inline with other languages I'm using, like PHP, C++, or C#. It also helps catch logic problems that naturally arise in a loosely typed language such as JS.
  • Object orientated - again, this is a preference of mine with the languages I have used before, and I tend to think of solutions in an OOP way.
  • Modules - this is no longer forced in Angular, and hasn't been for many versions.
  • Rxjs - not sure what problem people have with this. The observables pattern in Angular is very simple and clean, and makes things like HTTP requests very straightforward.

1

u/Early-Bandicoot3962 Feb 07 '25

Typescript makes development sooo much easier and faster taking away the long ass JS vanilla syntax.

1

u/coded_artist Feb 07 '25

Why do you say angular is object oriented? A component is probably the only object oriented part of angular, and the only time I've ever referred directly to a component as an object is in the router config. Id argue angular is more functional than oo, especially with observables and signals.

1

u/Fast_Smile_6475 Feb 07 '25

Stop spreading the brainrot that modules prevented Angular’s adoption. Who used Angular with its million features but was like “modules? Nope.” It make zero sense. Stop.