Live data from Hacker News

Angular 2 versus React

medium.com

21–30 of 249 posts

Re: Angular 2 versus React

#21
post #9

To me it really feels like Polymer is taking all of the pros from both of these "libraries" or "frameworks" or whatever you want to call it and none of the cons. Why aren't we talking more about that? Polymer is a fraction of the size. It's one of several ways right now to write custom components. React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For wha…

Well, browser compatibility is still a big problem with Polymer. A simple click-and-select-stuff-quickly-while-moving-mouse-around test can often lead to focus and/or the selection being "stuck" on Firefox -- even on simple widget demo pages. (This was a few months ago, things may have improved.) Probably on other browsers too. React works perfectly today. > I see 2016 as the year that people slowly begin to realize…

I should say, my post was more about web components and less about Polymer. Polymer is just one way to do it right now, and you're right, it is opinionated.

You don't need a library at all if that's what you prefer.

The polyfills are there now and they are solid. Webcomponents.js is small and effective. The simple click-and-select-stuff(...) that you are referencing about are probably specific to some bloated Paper elements. That's not what I'm talking about here.

Re: Angular 2 versus React

#22

I went "all in" on React a few weeks ago, but one probelm I had is the complexity of the various samples/starter kits. If anyone knows basic React and uses Typescript, and want to start using Redux/ReduxSimpleRouter, you'll find this interesting: https://news.ycombinator.com/item?id=10837377

Does this work with the new react router that was just released?

And did you try using Immutable.js ? From my understanding, it doesn't work so well with simple router.

Re: Angular 2 versus React

#23
post #3

React's learning curve is tiny compared to Angular. With React, you need to understand the component API, which consists of about 5 methods that one uses regularly, and the top level API, which consists of 2 (or just 1 if you use ES6 class syntax to create components). And as the article points out, it's just JavaScript.

When you factor in the learning curve of the usual tools that go with React like Flux/Redux, Webpack, Router and whatnot, the combined cognitive load becomes a lot.

Yeah, additionally React has a serious paradox of choice problem.

Which of the dozens of CSS solutions should I use? Inline styles or not? Which of the dozens of Flux libraries? Isomorphic/universal or client side? If Isomorphic, Express or Koa? Does react-router work with the choices I've made? Webpack or Browserify? It goes on and on...

I love React, but the environment and best practices are unclear to say the least.

Just look at how many starter kits there are and how big they tend to be: http://andrewhfarmer.com/starter-project/

Can only imagine how many of the choices made are going to be deprecated in a couple months.

Edit: Heh, and now that I've read the article, I see they hit on this issue. :)

Re: Angular 2 versus React

#24

I went "all in" on React a few weeks ago, but one probelm I had is the complexity of the various samples/starter kits. If anyone knows basic React and uses Typescript, and want to start using Redux/ReduxSimpleRouter, you'll find this interesting: https://news.ycombinator.com/item?id=10837377

Does this work with the new react router that was just released? And did you try using Immutable.js ? From my understanding, it doesn't work so well with simple router.

[deleted]

Re: Angular 2 versus React

#25
post #9

To me it really feels like Polymer is taking all of the pros from both of these "libraries" or "frameworks" or whatever you want to call it and none of the cons. Why aren't we talking more about that? Polymer is a fraction of the size. It's one of several ways right now to write custom components. React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For wha…

Well, browser compatibility is still a big problem with Polymer. A simple click-and-select-stuff-quickly-while-moving-mouse-around test can often lead to focus and/or the selection being "stuck" on Firefox -- even on simple widget demo pages. (This was a few months ago, things may have improved.) Probably on other browsers too. React works perfectly today. > I see 2016 as the year that people slowly begin to realize…

> This was a few months ago, things may have improved.

Polymer improved substantially with the 1.0 release. It was basically a full rewrite so if you checked it out before then, you'll have to re-check.

Re: Angular 2 versus React

#26
post #23
post #3

Earlier quoted context omitted.

When you factor in the learning curve of the usual tools that go with React like Flux/Redux, Webpack, Router and whatnot, the combined cognitive load becomes a lot.

Yeah, additionally React has a serious paradox of choice problem. Which of the dozens of CSS solutions should I use? Inline styles or not? Which of the dozens of Flux libraries? Isomorphic/universal or client side? If Isomorphic, Express or Koa? Does react-router work with the choices I've made? Webpack or Browserify? It goes on and on... I love React, but the environment and best practices are unclear to say the lea…

There is also a lack of best practices, combined with constantly breaking changes. Every tutorial before the last month is already outdated, and everybody has a different way of setting up webpack / isomorphism / templating.

Re: Angular 2 versus React

#27

I went "all in" on React a few weeks ago, but one probelm I had is the complexity of the various samples/starter kits. If anyone knows basic React and uses Typescript, and want to start using Redux/ReduxSimpleRouter, you'll find this interesting: https://news.ycombinator.com/item?id=10837377

Does this work with the new react router that was just released? And did you try using Immutable.js ? From my understanding, it doesn't work so well with simple router.

i tried Immutable, but it adds lots of tangential stuff, way too much for a React/Redux beginner (like me).

and, using react-router from a couple weeks ago, so this is using the "old" 1.x version.

Re: Angular 2 versus React

#28
post #7

> React is a library. It’s precisely the opposite philosophy of large, comprehensive frameworks like Angular and Ember. So when you select React, you’re free to choose modern best-of-breed libraries that solve your problem best. JavaScript moves fast, and React allows you to swap out small pieces of your application for better libraries instead of waiting around and hoping your framework will innovate. Just an aside,…

> I'm ashamed to say it took me about 10 minutes to do it in the Google console. Part of it is unfamiliarity, sure...but nothing interacted the way that I, as a developer, expected it to.

You can make sloppy interfaces with any library or framework. Angular is no exception. Neither is React.

Re: Angular 2 versus React

#29
post #19
post #9

To me it really feels like Polymer is taking all of the pros from both of these "libraries" or "frameworks" or whatever you want to call it and none of the cons. Why aren't we talking more about that? Polymer is a fraction of the size. It's one of several ways right now to write custom components. React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For wha…

Why did Google create Polymer? Google isn't using it. This is almost the same 'problem' with "AngularJS by Google", it's almost never used by Google. Edit: The reason I like React more is the fact that Facebook uses it in a high traffic production setting. Edit 2: I think the whole Javascript (or framework) fatigue is just a 'transition problem'. Old tools are getting replaced by new tools, causing confusion..

Chrome's PDF viewer is written in Polymer

Re: Angular 2 versus React

#30
This is continuing to shape up to be another one of those preference debates.

I prefer the Angular approach, as its end goal is to simply make web markup what it should be: Interactive. The downside being that you're forced into Angular's opinions for better or worse.

I don't prefer the more "tangled" approach of React. I call it tangled as it's mixing two flavors in one "view", whether you like it or not: JS and HTML. Many people like the approach, and I can see why they do. I don't.

Those are preferences. So much more goes into making an app efficient, testable and expandable. The biggest ingredient is comfort. If you and your dev team are comfortable with React, that's going to be your best option. It's not the wrong option, it's a great option. For me, it's Angular.

However, I feel compelled to say that the debate should be Angular 2 v React. Having used others (... Ember....) it just doesn't make much sense to use anything outside these main 2 contenders unless you're using some of the new "cool" web components based stuff. Angular is solid. React is solid. Compare, contrast and make your decision based on how comfortable you feel with the getting started docs.

Post reply on HN