Hacker News new | ask | show | jobs
by fridek 3928 days ago
Because React solves only the directive part of Angular? I'm not saying it's great BTW, but comparing React to Angular is silly. That's like saying you chose lodash.js over Angular.
8 comments

This was probably a valid observation two years ago, when the React story on state management was "bring your own solution." But these days, although it's technically a separate project, Flux is the de-facto state management solution that a React-first webapp will use. There are lots of competing implementations (I use redux) but my point is that you'd be hard-pressed to find an app written in Angular that couldn't also be written using React+Flux. Of course the architecture is going to look different, but you can certainly get to the same place.
Sure you can. And as I said, I'm not a big angular lover. In fact we used Backbone for REST in it, because of shortcomings of the $resource at the time.

And flux is great and React-first, but it's not technically a part of React. And it is also great, having a choice is usually a good thing.

Still I'm skeptical when people are happy just because they moved from angular to react. Or from any X to Y really. Usually the gain comes more just from rewriting things with better understanding of the project and from more established team. No one does A/B studies on it, right?

React usually comes with the connotation of using Flux as your data, state and control mechanism (we use ALT as our implementation) and then usually the NPM and Browserfy ecosystem to fill in the gaps as needed with libraries. It is a valid replacement for Angular but takes more of the perl or ruby approach to grab what you need and not the Angular, Java or .NET approach of most of it is already in the bag.

Personally I like the event/component oriented development style of Flux/React over procedural controllers that tend to become monolithic. The browser model was always event based, but with the flood of server side development talent the JSP / ASP controller model trickled over. It takes time for people to realize there is a better way.

> Because React solves only the directive part of Angular?

I can't say I miss anything from angular in React. If anything it's good that React does not try to go too far down the rabbit hole. Which particular functionality is absent in React that you need?

>Because React solves only the directive part of Angular?

Lots of people keep repeating that.

It's obvious he means React + React Router + some Fluxy helper lib.

Just substitute "React-based solution" when you read React, and the whole "apples to oranges" or "Angular has so much more" fades away.

(Not to mention that some of us find Angular bloated in the first place, so that it handles "so much more" is not really an asset for us).

React encourages a certain style of development/architecture to a degree. Sure, it doesn't compete with Angular feature for feature, but it does encourage a style that IMHO is different enough to be interesting as a conversation topic when discussing alternatives to Angular.
Have you been paying attention to the React ecosystem in the past... year or so?
Your attempt to answer with an out-of-context question didn't worked. Please retry :-)
> like saying you chose lodash.js over Angular.

It's a valid comparison, if you feel Angular tries to solve problems you don't have, and in doing so, causes other headaches.

I would rather use any bare bones library, or no library at all, than Angular.