Live data from Hacker News

Angular 2 versus React

medium.com

41–50 of 249 posts

Re: Angular 2 versus React

#41
post #23

Earlier quoted context omitted.

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.

>lack of best practices

How many 'best practices' do you need? What about 'higher order components'? Use proptypes in development? 'Avoid local state'?

>constantly breaking changes

I call bullshit, what was the last breaking change? Every large release still supports the old deprecated syntax, but with warnings.

>Every tutorial before the last month is already outdated

That is a big exaggeration; I wouldn't advice anyone to use 'pre es6' tutorials, but the concepts still apply.

>everybody has a different way of setting up webpack / isomorphism / templating.

No they don't, maybe a small differences and what do you mean with 'templating'? It's not Angular.

Re: Angular 2 versus React

#42
post #24

Earlier quoted context omitted.

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]

Huh? Immutable.js is written in Typescript, and it's advocated by Redux, so I figured it's a natural fit in the React ecosystem. At least ideologically.

Actually wiring it up sounds difficult.

Re: Angular 2 versus React

#43
post #37

Earlier quoted context omitted.

> React and Angular2 do the same thing yet they are both bloated and force tons of tools and tech down your throat. For what? State control. The most important thing about a React app is that you can write your code to have every bit of application state inside a single variable. It gets you hot code loading, trivial testability, and session recording/replay. I can actually test the app without having to use selenium…

Note that mithril is much more lightweight than react, offers a similar vdom model, but has a completely different algorithm for deciding when to redraw. I actually think that mithril's redraw algorithm is less intuitive to use than react, but it is way simpler, which has its own advantages.

There are a bunch of alternative implementations. The vdom benchmark [1] is a fairly good list but I've run across at least two more that aren't tracked there.

[1] http://vdom-benchmark.github.io/vdom-benchmark/

Re: Angular 2 versus React

#44
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…

There is more to web development than building components. There are also things like accessing a backend, building authentication services, etc. that developers need to worry about.

Re: Angular 2 versus React

#45
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…

There is more to web development than building components. There are also things like accessing a backend, building authentication services, etc. that developers need to worry about.

Are you under the impression these things aren't possible (or even easier?) with web components or vanilla JS? You don't need a big framework for any of that.

Re: Angular 2 versus React

#46

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 HTM…

> I call it tangled as it's mixing two flavors in one "view", whether you like it or not: JS and HTML.

Doesn't Angular mix HTML and JS too, except in the HTML file?

Re: Angular 2 versus React

#47
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..

Google is using (or has used) Polymer in Google Music, Santa Tracker, Google I/O Web App, chromestatus.com, and likely a few others I'm forgetting.

Re: Angular 2 versus React

#49
post #8

> You spend your time writing plain ‘ol JavaScript. That’s the future I believe in. How about a future where you don't write any code at all? This is the beauty of Angular's markup-centric approach, it's declarative so that means less code, which means less opportunities for devs who enjoy typing to screw things up. Jeremy Keith made a good point in his An Event Apart talk [1], where he talks about HTML slowly subsum…

Markup languages are designed to be computer-readable descriptions of documents. Programming languages are designed to be computer-readable descriptions of general instructions. Modern web applications (the sort of web site for which you would consider heavily using React, Angular, Web Components, etc.) are not really documents. It's really nice having a general purpose programming language to describe the instructions for such web applications.

Re: Angular 2 versus React

#50
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…

Is there any substantial apps written in Polymer yet?

The Google cloud developers console is most probably built with polymer
Post reply on HN