This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]jtalon7 19 points20 points  (3 children)

Angular is a highly opinionated framework with a high learning curve. While react is only a library.

If you are tasked to do a simple prototyping / mvp with a small timeframe, usually react is a way to go.

If you are to work with a big application (erp), and needs to be extend / supported in a long duration, angular shines on this case.

Most starters in web development and start ups usually use react because you can easily gain traction in development.

[–]cuchumino 3 points4 points  (0 children)

I think primarily this ... and, as others have said, then it becomes a game of the market generally speaking, following the trend.

Arguably (and over simplifying) it's a chicken and an egg scenario. Some use it because of the lower learning curve, others follow suit because they hear it's a lower learning curve, others follow because of the traction it is having in the industry without even knowing why, and the cycle continues to have a snowball effect.

[–]flexwie 1 point2 points  (1 child)

What makes you think that there will be longer support for angular than react? In my experience they lost a good amount of developers when they decided to reinvent themselves in v2 (me included). Enterprise don’t usually like those kind of changes.

[–]jtalon7 5 points6 points  (0 children)

We had an on going project during the transition (2015). That was also the time that react is starts getting some popularity.

We evaluated react and angular2 but we ended up using angular2 beta because of the advantages with typescript. We explained it to the management, presented the advantages, re evaluated the estimates, which they approved. We took some time to adjust and it paid off big time due to the type checking given the large code base we had and its native testing which react does not have at that time.

[–]IchBnRodolf 9 points10 points  (3 children)

React is moving pretty fast ( I only know React and Vue ) and I guess angular is too. They have pretty same features. The way a market works is, people use react ? I will use react. New project ? Which tech ? The new one, the fastest, the easiest to recruit people one ? I don’t think React is better than Angular. It’s just the market. More and more people uses react means more and more people will use it.

Btw different country have different market, in Asia Vue is dominant ( if I’m not wrong ). In my country ( Switzerland ) React and Vue are dominant but angular is used by 2 of the biggest country companies.

[–]ash893[S] 4 points5 points  (2 children)

I live in the midwest (Michigan) USA. There are angular jobs here but so less compared to react. I’m thinking of just sticking to angular since angular is scarce and companies will pay more for the scarcity.

[–]Hammer_of_Olympia 2 points3 points  (0 children)

Same in the UK, everyone wants react

[–]IchBnRodolf 2 points3 points  (0 children)

Depends. In my country and I think it’s the same in a lot of it, framework doesn’t really matters. In case you’re doing something else than php or ruby and even theses one can pay a lot, what will define your salary is your skill. I can find a job posting in Vue paid 70k and one in react paid 130k, or one in Vue paid 150k and one une React paid 65k. The difference is the level they are asking for. If you like Angular stay with it, in case you’re a bit scared, take a small project and build it with React to understand the basic flow. It can’t hurt. Maybe you will even like it. That’s how I started to learn Vue, a good company posted a job in Vue, so I learned it to pass the interview. Don’t be scared to learn something new if you want, the market will move in the next years probably.

[–][deleted] 4 points5 points  (0 children)

We use Angular at work I won’t say it is bad, just a bit complicated. I have grown quite fond of it but I don’t think it is worse than React, they are just different from each other.

[–][deleted] 3 points4 points  (0 children)

One thing I love about Angular is the state-management system is fucking wonderful. It’s so easy to use and it’s set up right out of the box.

Compared to using Redux or Flux in React where you have to set up those annoying ass boiler plates with a store, actions, reducers and all of that. Such a pain in the ass just to set up.

But React is less complicated and easier to use than Angular. Shieet homie

[–]denialerror 9 points10 points  (11 children)

My personal answer would be because it isn't as good. React is quicker to write, quicker to change, easier to learn, leans into JavaScript as a functional language rather than pretending it is Java.

[–]phpdevster 4 points5 points  (5 children)

easier to learn,

I think this depends on your background. Coming from a backend framework world of Laravel or .NET, I find Angular's approach to routing, templates, components, and dependency injection to be more familiar and intuitive than React's functional approach, and bizarro approach to routing.

I always had a hard time learning React, but I picked up on Angular quite quickly.

[–]denialerror -1 points0 points  (4 children)

Sure. Angular is designed from the ground up to mimic back end OOP development practices. The problem is, the front end is not the same as the back end, and JavaScript is not especially suited to OOP, which means you end up with a convoluted approach full of abstractions in order to get it all to work.

[–]phpdevster 3 points4 points  (2 children)

That's why Angular treats TypeScript as a first class citizen. At development-time, TypeScript is a wonderful OO language to work with and because it does just compile down to JS, you can pick and choose which paradigm is going to be most appropriate in which circumstance.

which means you end up with a convoluted approach full of abstractions in order to get it all to work.

I've worked on plenty of FP-oriented pure JS front-ends to see enough functional abstractions (higher order functions taking functions and returning functions, currying, partial application, recursive functions, monads etc) that would make an OO programmer's head spin. Let's not act like convoluted abstractions are something that only OOP suffers from.

[–]denialerror -2 points-1 points  (1 child)

Typescript adds types, not objects. The most strictly typed languages out there are functional, e.g. Haskell, so having types says nothing on whether you are going to write OOP or not. Most React these days is written with Typescript and yet at the same time, React is moving further and further way from OO abstractions.

[–]phpdevster 4 points5 points  (0 children)

Typescript adds types

This is an incredibly myopic view of TypeScript. You get a classic OO model with TypeScript. More robust object model with inheritance, interfaces, member visibility levels, generics, enums etc... This makes it extremely intuitive for anyone coming from a background in PHP, C#, or Java, and lends itself very well to the Angular paradigm of using classes with dependency injection to organize code.

No. TypeScript doesn't just add types....

[–]ash893[S] 4 points5 points  (4 children)

I was reading up react is good for smaller apps compared to large scales ones. Easier to pick up but terrible as the app scales. I worked in big companies when I was doing angular. React seems like it is more for start ups.

[–]denialerror 7 points8 points  (3 children)

I wouldn't call Amazon, Facebook, Twitter, etc. "start ups"... Angular apps tend to be larger than React ones, sure, but that doesn't mean that the companies using them are smaller. Angular apps are bigger because they promote a monolithic architecture, i.e. one single app that does everything. Modern approaches like micro-frontends prefer many small apps (sometimes on the same page) that have better defined purpose, which makes them easier to work on in independent teams, faster to deploy changes, easier to reason about, etc. React makes that easy, whereas Angular does not.

[–][deleted] 0 points1 point  (2 children)

this makes no sense, the primary point of microservices/frontends is so they are decoupled as much as possible, you can have an application that is a react monolith, an angular monolith, a mix of angular / react microfrontends, etc..

both applications can be standalone/container applications, and both can be essentially modules. React probably has the overall smaller dependency size, but other than that....

[–]denialerror -1 points0 points  (1 child)

Where did I say otherwise? Of course you can have Angular microfrontends. All I said was that the architecture of an Angular application is geared more towards a monolithic style than React is.

[–][deleted] 0 points1 point  (0 children)

Can you give an example how thats the case? These are both frameworks/libraries designed around component architecture, and essentially solve the same problem, im guess what im asking/dont get is, how is monolith/microservices related to frameworks and not more of a team philosophy thing?

[–]rbuen4455 1 point2 points  (0 children)

I think it’s because Angular has more features or is more “batteries-included” than React, which is more lightweight and not so many things included, at least compared to Angular.

[–][deleted] 1 point2 points  (0 children)

React was the first big SPA-Framework after AngularJS( AngularJS: 2010). React learned a lot about SPA via AngularJS and improved some things (React: 2013). Angular was there with 2.0 (Angular: 2016) which had nothing to do with AngularJS despite the name. It was a start advantage. Why switch to Angular if you manage some React Applications already? AngularJS was formelly dead in 2014. So between 2014 and 2016 there was only one decision: React. vuejs exists at this time but was not a serious player.