Live data from Hacker News

Angular 2 versus React

medium.com

141–150 of 249 posts

Re: Angular 2 versus React

#141

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

One of the biggest problems I have is the number of things I need to install at $EMPLOYER to make it all work. Typescript I can get approved because it's "Microsoft", but Node/NPM and Ruby? (for SASS) Not a chance - even if it could make it out of the NTLM-auth proxy.

Node/NPM is installed as part of Visual Studio 2015 these days, is it not?

Edit: Note I'm not saying you should install VS2015 just to get Node, but it might help you convincing the powers that be that "hey, Microsoft installs these components as part of VS2015, so it's not that weird, I promise".

Re: Angular 2 versus React

#142
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?

Google Play Music and Youtube Gaming are two of the larger ones.

Re: Angular 2 versus React

#143
post #141

Earlier quoted context omitted.

One of the biggest problems I have is the number of things I need to install at $EMPLOYER to make it all work. Typescript I can get approved because it's "Microsoft", but Node/NPM and Ruby? (for SASS) Not a chance - even if it could make it out of the NTLM-auth proxy.

Node/NPM is installed as part of Visual Studio 2015 these days, is it not? Edit: Note I'm not saying you should install VS2015 just to get Node, but it might help you convincing the powers that be that "hey, Microsoft installs these components as part of VS2015, so it's not that weird, I promise".

Yeah - at the moment we don't have VS2015, but as long as that particular node.exe is signed with an MS certificiate it'll run fine.

Re: Angular 2 versus React

#144
post #141

Earlier quoted context omitted.

One of the biggest problems I have is the number of things I need to install at $EMPLOYER to make it all work. Typescript I can get approved because it's "Microsoft", but Node/NPM and Ruby? (for SASS) Not a chance - even if it could make it out of the NTLM-auth proxy.

Node/NPM is installed as part of Visual Studio 2015 these days, is it not? Edit: Note I'm not saying you should install VS2015 just to get Node, but it might help you convincing the powers that be that "hey, Microsoft installs these components as part of VS2015, so it's not that weird, I promise".

[deleted]

Re: Angular 2 versus React

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

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

>State control

It took me a long time to figure that was the point and it still kind of seems you could write in good old plain javascript:

x = "some state"

if (you want to change it) { x = "some other state"

    DrawThingOneThatDependsOnx()

    DrawThingTwoThatDependsOnx()}
Rather than spending days learning the tons of bloat, tools and tech that effectively does that for you under the hood anyway?

(Plus with vanilla js running up to 40x faster than React https://news.ycombinator.com/item?id=9824884 apparently)

Re: Angular 2 versus React

#146
post #127
post #16

Earlier quoted context omitted.

You don't need Flux/Redux to use React. React without a Flux-alike is very much like Sinatra compared to Rails. If your goal is to learn React, Flux gets in the way, and you shouldn't bother. Browserify/Webpack is a giant pain and my least favorite part of this programming environment, but I'm not clear what it has to do with React. Is the concern here that React is packaged in such a way that you can't use it with a…

Webpack is used for hot reloading otherwise Gulp can suffice to provide you with a command to compress your css and jsx files. You could do it manually with the cli to begin with but I'd use a build automation tool going forward.

s/compress/compile/;

Re: Angular 2 versus React

#147
post #98

I prefer angular over react. 1) It is opinionated (wasting time for decisions is bad) 2) It is simpler to organize the code (it is MVC) 3) (click)="onSelect()" is simpler. You dont have to create an object with "bind" function like in react. 4) I dont want web designers mess with my code. So putting html on JS is bad decision.

But do you want web designers to mess with your markup? Many of the projects I work on still involve the 'old-fashioned' server-side rendering approach with bits of jQuery for interactive elements. If a non-coder webdesigner were to mess with my markup, everything would break anyways. I guess what I'm saying is that I've worked on many types of projects in many kinds of environments, and whenever a front-end framewor…

I don't have a horse in this race, but do you think that learning JSX is going to be any easier for non-coders?

Re: Angular 2 versus React

#148
post #66

"Angular 2 continues to put “JS” into HTML. React puts “HTML” into JS." It seems fairly obvious to me that both approaches are wrong.

Have you tried either? What is your concern with mixing the two? JSX is optional, by the way. I have a problem with JS into HTML because that's pseudo-coding. JSX tags are representations of classes and class instances, which makes a lot more sense than a totally new DSL for scripting.

Re: Angular 2 versus React

#149

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.

Data (JS) and presentation (HTML) are necessarily coupled. Hiding that coupling in crazy tokens and syntax in HTML is not equivalent to removing it.

Re: Angular 2 versus React

#150
IMO the standout difference between Angular and React is how you think about your application. Do you like functional programming paradigms and want to apply them in writing your components? Use React. Do you think immutability is too restrictive and love things like two-way binding? Use Angular.

That being said, I'm a bit disappointed to see no mention of Aurelia although the author has mentioned other frameworks like Emberjs. I have been writing production code with Aurelia for about a month and this has been so far my best experience with any client side javascript framework. ES6 is very capable and Aurelia did it right by staying out of your way for most of the times by letting you write your components in plain ES6. All the while providing binding capability(with beautiful syntax), a very powerful router and out of the box package management support. I feel with all the commotion in framework space, more people will appreciate the simplicity of Aurelia and that camp will get bigger as time goes by.

Post reply on HN