Live data from Hacker News

React vs. Angular 2

docs.google.com

11–20 of 87 posts

Re: React vs. Angular 2

#11

Isn't this like comparing apples to a fruit salad? Quoting from the React website, "Lots of people use React as the V in MVC," whereas Angular is the whole kit `n' kaboodle. I thought React was supposed to be used in tandem with a Flux-like component that stores the state of the application, thereby allowing the developer to adopt the functional reactive programming style. Anyways, I think React will be short lived,…

What's wrong with RxJS and React that makes you think it will be short lived as an alternative to Elm?

Re: React vs. Angular 2

#12

For someone who hasn't had to do much work on the front end JS technologies like Ember, Angular, React, etc. What is a good resource to start learning Angular 2 (even though its not out yet)? I came across ng-book2 [0] but I've heard mixed reviews about their first book. [0] https://www.ng-book.com/2/

I, myself, tried to learn it by generating a sample project with Yeoman. Only to find myself in a project where so many things were already done for me that I couldn't make sense of all the pieces that allowed it to work correctly. I would make a couple of changes and if one of them broke something, I was not able to quickly identify what I had done that was a problem. I'd recommend that you go step by step a build a…

I've had exactly the same experience. I tried bootstrap generators like yeoman, cloned "starter kit" repositories, etc... And they would all have ~1 kilolines of code and a bunch of dependencies. If I tried to do anything (like, say, add react-bootstrap), everything would stop working.

The best way is to follow a tutorial and build a small project from the ground up. Stay away from prefabricated solutions until you understand what's going on.

Re: React vs. Angular 2

#13

Isn't this like comparing apples to a fruit salad? Quoting from the React website, "Lots of people use React as the V in MVC," whereas Angular is the whole kit `n' kaboodle. I thought React was supposed to be used in tandem with a Flux-like component that stores the state of the application, thereby allowing the developer to adopt the functional reactive programming style. Anyways, I think React will be short lived,…

> Anyways, I think React will be short lived, because anyone who really wants to hop on the FRP bandwagon...

I don't think most front end developers even care. React will stick around because it's backed by Facebook and if Facebook says this is the way to go with front-end development then that is all the convincing most folks need. They'll go on to learn React and not think twice about the minutiae of "FRP" or whatever the programming paradigm de jour is because at the end of the day, people just want something they can easily grok, something that works without too much hassle and something that is going to be used/supported for the long term.

Re: React vs. Angular 2

#14

Isn't this like comparing apples to a fruit salad? Quoting from the React website, "Lots of people use React as the V in MVC," whereas Angular is the whole kit `n' kaboodle. I thought React was supposed to be used in tandem with a Flux-like component that stores the state of the application, thereby allowing the developer to adopt the functional reactive programming style. Anyways, I think React will be short lived,…

> because anyone who really wants to hop on the FRP bandwagon will pick up something like http://elm-lang.org

Elm is awesome, but also look into Cycle[1].

[1] http://cycle.js.org

Re: React vs. Angular 2

#15
post #5

For someone who hasn't had to do much work on the front end JS technologies like Ember, Angular, React, etc. What is a good resource to start learning Angular 2 (even though its not out yet)? I came across ng-book2 [0] but I've heard mixed reviews about their first book. [0] https://www.ng-book.com/2/

Honestly? I would start with React. The way Angular 2 has been going, they are adopting a lot of new ideas from React.

But what about angular being a framework and react being a library? Ido hate to invest time in react only to find out that when working on some project it doesn't provide all I need. By project I mean some backend api and front end SPA

Re: React vs. Angular 2

#16

Isn't this like comparing apples to a fruit salad? Quoting from the React website, "Lots of people use React as the V in MVC," whereas Angular is the whole kit `n' kaboodle. I thought React was supposed to be used in tandem with a Flux-like component that stores the state of the application, thereby allowing the developer to adopt the functional reactive programming style. Anyways, I think React will be short lived,…

> anyone who really wants to hop on the FRP bandwagon will pick up something like http://elm-lang.org in order to fully achieve Satori

Or you could just use React with Redux, like many people are doing! :)

https://github.com/rackt/redux#influences

Re: React vs. Angular 2

#18

What is this FRP thing JS developers talking about? What I should read to learn more about it?

It's been around in various forms, and implemented on top of various languages, for quite some time.

The earliest full-fledged FRP implementation for JavaScript was Flapjax – work on it dates all the way back to 2006!

http://www.flapjax-lang.org/

The paper Flapjax: A Programming Language for Ajax Applications is worth reading.

http://cs.brown.edu/~sk/Publications/Papers/Published/mgbcgb...

The principal designer and maintainer of the Elm Language (a functional reactive lang that compiles to JS) did his Master's Thesis on FRP, and that's a great resource if you want the big picture:

https://www.seas.harvard.edu/sites/default/files/files/archi...

See also Controlling Time and Space: understanding the many formulations of FRP, by the same author:

https://www.youtube.com/watch?v=Agu6jipKfYw

Re: React vs. Angular 2

#19

Isn't this like comparing apples to a fruit salad? Quoting from the React website, "Lots of people use React as the V in MVC," whereas Angular is the whole kit `n' kaboodle. I thought React was supposed to be used in tandem with a Flux-like component that stores the state of the application, thereby allowing the developer to adopt the functional reactive programming style. Anyways, I think React will be short lived,…

> Anyways, I think React will be short lived, because anyone who really wants to hop on the FRP bandwagon... I don't think most front end developers even care. React will stick around because it's backed by Facebook and if Facebook says this is the way to go with front-end development then that is all the convincing most folks need. They'll go on to learn React and not think twice about the minutiae of "FRP" or whate…

> React will stick around because it's backed by Facebook and if Facebook says this is the way to go with front-end development then that is all the convincing most folks need.

Not just that. Facebook uses it for their flagship website (and as React Native for their mobile apps). So does Instagram. So does Netflix. If you have the React developer tools installed you can literally go to facebook.com or netflix.com and see them using React.

Angular in turn can't really namedrop use cases like these. Yes, Google uses it somewhere in their ad manager, YouTube uses it in their video manager, Amazon uses it for something -- these are big names too, but the use cases aren't nearly as impressive and they're not as integral to the relative companies' core business. Google (who is backing Angular) doesn't have nearly as much skin in the game as Facebook (who is backing React).

The difference between React and FRP in turn is that React simply builds on well-understood ideas that already exist in mainstream front-end programming: modular components and one-way data flow. You don't need a CS degree to understand the benefits of having your views not directly manipulate your state.

FRP isn't bad. It's just that React is good enough, which is what really matters at the end of the day.

Re: React vs. Angular 2

#20
post #5

For someone who hasn't had to do much work on the front end JS technologies like Ember, Angular, React, etc. What is a good resource to start learning Angular 2 (even though its not out yet)? I came across ng-book2 [0] but I've heard mixed reviews about their first book. [0] https://www.ng-book.com/2/

Honestly? I would start with React. The way Angular 2 has been going, they are adopting a lot of new ideas from React.

The team I'm apart of started a project 2 months ago. We chose React and Redux over Ember, Angular, et al. A main decision factor was that we needed the server to render our initial HTML, neither Angular nor Ember can achieve this easily, we'd most likely have to lean on a third-party service. Angular looked particularly unattractive with Angular 1 being as good as dead and we didn't feel confident starting with Angular 2, there we're simply too many unknowns. We loved the hot loading & the redux-devtools features, turns out these have given us a decent productivity boost.

2 months into the project I'm confident we chose the best tools for the job, there's been absolutely no regrets from the team members.

Post reply on HN