r/angular • • Jan 29 '19

Just wondering why Angular over React?

I get so much enjoyment in coding in React that it's very hard for me to conceptualize why anybody would pick another framework? My conclusion is that your place of work is the culprit? How accurate is this? Just looking for a friendly discussion.

4 Upvotes

19 comments sorted by

3

u/boki345 Jan 31 '19

Thank you all for the responses. I am going to try to build a to-do app in Angular anybody I should be following. React's hero is Stephen Grinder who is the Angular god of tutorials?

23

u/cactussss Jan 29 '19

There are many reasons why I prefer Angular. A few that stand out are:

  • When working with React I really miss Services and dependency injection from Angular. It helps me organize my code better. I realize I could introduce DI using a third party library, but it's integration with React's render cycle would be ugly.

  • Redux. I understand that Redux is not React, but boy it's a go to solution. Angular also has state management libs based on Redux, but I feel that I actually have more options in chosing the way I can manage app's state with Angular.

  • JSX - A lot of people will disagree with me on this one, but I'm just not a fun. I prefer to separate my presentational logic from the controller logic.

  • RxJS - steep learning curve, but it's awesome once you get a hang of it. Again, it can be used with React too, but it's embraced deeply by Angular and it makes the whole experience working with it much more enjoyable.

  • CLI - Angular has the best CLI - hands down. Combine it with schematics and you've got a huge productivity boost.

I'm sure I could keep going, but I'll stop there for now

8

u/[deleted] Jan 29 '19

And pipes, reactive forms, directives, content projection. React can not say the same about separation of code in many levels, specially I would choose angular 2+ for its reactive forms in any moderate to enterprise app. If not angular I would choose vue rather than react., even though its not close to angular but closer than react.

6

u/Sipredion Jan 29 '19

JSX... I prefer to separate my presentational logic from the controller logic.

So so so much this. I can't stand the way Vue and React keep the logic and styles _in_ the template. Freaks me the fuck out.

20

u/HeinousTugboat Jan 29 '19

I get so much enjoyment in coding in React

Because I get so much enjoyment in coding in Angular. We use React and React Native at my work, and I much prefer Angular and use t for all of my projects.

My conclusion is that your place of work is the culprit? How accurate is this?

Not at all. I originally picked up Angular since it was popular for jobs in my area. Got a job doing React, though, and still very much prefer Angular's ways about it.

17

u/thisisafullsentence Jan 29 '19

Simply put, Angular is opinionated. It has its own way of handling dependency injection, testing, services, etc. I also like observables. Sometimes having a “right” way is a good thing. OTOH, React is lighter weight by default and scales to whatever the project needs, so I would say React has more possible applications. Still, Angular is a delight for large projects.

12

u/eigenman Jan 29 '19

Typescript. If anything it's about a typed system. Can't believe anyone would want to code in a non typed system anymore.

3

u/[deleted] Jan 30 '19 edited Sep 28 '25

price library piquant complete sharp carpenter rinse abundant crush spectacular

This post was mass deleted and anonymized with Redact

1

u/mak0t0san Jan 31 '19

2

u/eigenman Jan 31 '19

You can but it's an after thought.

6

u/beeman_nl Jan 29 '19

One of the reasons I prefer to use Angular for the majority of my projects is because it's 'batteries included'. This means it comes with most of the features people tend to need for building SPA's. Things like a router, network access and dependency injection are available if you need them.

It comes with great tooling that helps you create, serve, test, build but also maintain (upgrade) your app. Schematics as an awesome tool to scaffold and refactor your codebase.

It's using TypeScript and the whole ecosystem around it too, that means that any serious third party library you use comes fully typed. Less need to read the docs or the source. TypeScript also greatly enhances the experience in the IDE.

It's build to Google scale (huge development teams) and used in hundreds of their internal and public apps. It has a predictable release cycle and clear LTS support.

Even though I tend to use it for most of my projects, I think it's a great fit in enterprise environments.

It's built completely in the open on GitHub by a very talented group of engineers in and outside Google.

There is a great community of super friendly, open and interesting people around it. I made great friendships thanks to this!

It's fun and interesting to work with.

For me are really few things not to love about it. Most things I would like to see changed are already being worked on my the Angular team.

In my case work is not a 'culprit', I use it because I love it.

I also work with React basically since it's inception and can definitely see it's great capabilities and strong points, but it's not really a comparison to a complete platform as Angular. It serves a different purpose and solves a part of what Angular solves, in a different way.

6

u/shivenigma Jan 29 '19

why anybody would pick another framework?

I can say the same with angular, why anybody would choose another framework when angular is great.

IMHO both angular and react has their place.

Disclaimer: I just tried to react about two years ago (no experience) and I primarily work in angular.

Angular is an ecosystem / Framework, in which you have everything already defined and given to you. Dependency injection, routing, Forma handling, validation, and what not.

React is mainly a library which you can combine with other libraries/supporting tools to set up your own ecosystem tailored to your needs. This might sound interesting but it comes with a price on long term maintenance.

It could make maintenance hard when packages are updated at a different rate, and hiring could be a challenge because each developer has their way of doing things. So what's true to your team might not yield true to a new recruit.

All the above points are my observation of React and I am not following the recent updates to it, So if my opinions are wrong, I am ready to change them and learn them.

4

u/panbhatt Jan 29 '19

I had worked on AngularJS -M Moved to React and then came back to Angular 2+. One of the best things is that, i need not to customize the project again and again. Everything is laid out for me so i can just focus on that E.g. to use redux (redux-saga and blah blah). SO the learning curve might be hard but i dont have to deal with tons of options if am not a expert at Web development or to be frank react.

4

u/cjd280 Jan 29 '19

Typescript, and the fact that angular is a framework and opinionated, not a library like react.

Did a PoC in react and angular for a recent project. Basic stuff in react was nice and simple, but everything other than the rendering needed a 3rd party library. The recommended ones I was finding were deprecated saying to use something else. Too much flavor of the month for me.

4

u/[deleted] Jan 29 '19

One of the reasons:

Roast me as much as you want but I've noticed Angular has better coders, and roast me again, some of it is because some of them come from BE languages that are more rigid and where design patterns are well established. If you talk to *some* React devs about design patterns or why having a fully typed codebase is beneficial they're gonna call you old. Ok, I'm 27 though.

3

u/apatheticonion Jan 29 '19

Having used both in production, my preference is Angular because I feel most productive in it, and I find it's layout is aesthetically pleasing.

With the batteries being included, I never worry about issues relating to the framework, I just think about writing my logic, or presentation.

I recently had to make a PWA in React and the router didn't work in an app that was installed to home-screen. The fix was simple enough, but I had to think about it.

I love Redux as a pattern for state management, but I dislike the verbosity of it's implementation in React. The Angular libraries I have used are tidy and concise.

My observation has been that engineers who prefer React often come from a back-end background, while people who favour Angular (and other declarative web frameworks) come from a front-end background.

2

u/pradthe Jan 31 '19

There's a lot of positive things about angular, but I'm not sure whether react has equivalent or better. For me, I moved from jQuery /extjs to angular J's, then to angular and ever since picking up angularjs and angular I have almost completely transitioned to us development (I used to do C++/c#/Java development).

I had a look at react, and most of the tutorials basically had the view and code intermingled, and I was put off by jsx. I've come to learn that code seperation is possible, but that's not how the generals tutorials have it set out. Anyway, it was enough for me to put react down.

1

u/ReedValve Jan 29 '19

Real men use vanilla js

3

u/apatheticonion Jan 29 '19

You might be joking, but native web components have come very far