Live data from Hacker News

Opinionated Comparison of React, Angular2, and Aurelia

github.com

71–80 of 169 posts

Re: Opinionated Comparison of React, Angular2, and Aurelia

#71
post #59
post #50

Earlier quoted context omitted.

In React there are no templates, just component trees.

Everything in react is done in the template language. This react below is not JavaScript... it's a reverse template language with a mix of not-quite-html and not-quite-JavaScript. jQuery style code is nicer than that! I hate the enterprise boilerplate in react projects. No wonder they're all failing! class Square extends React.Component { constructor() { super(); this.state = { value: null, }; } render() { return ( t…

JSX is not a template language, it is just syntax sugar: see it as a different way to write javascript: https://facebook.github.io/react/docs/jsx-in-depth.html you can't say the same about templates.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#72
post #59
post #50

Earlier quoted context omitted.

In React there are no templates, just component trees.

Everything in react is done in the template language. This react below is not JavaScript... it's a reverse template language with a mix of not-quite-html and not-quite-JavaScript. jQuery style code is nicer than that! I hate the enterprise boilerplate in react projects. No wonder they're all failing! class Square extends React.Component { constructor() { super(); this.state = { value: null, }; } render() { return ( t…

[deleted]

Re: Opinionated Comparison of React, Angular2, and Aurelia

#73
post #31

Comparing plain React with Angular and Aurelia is completely useless. You cannot write a big serious application with Form Validation, Data Fetching, Testing, etc, just with React itself. A fair comparison would be to write a whole "real world" project and then see what parts you have to use and learn to be able to write a full React application.

Author didn't compare "plain React". Author compared React with React Router (and possibly Redux/whatever for state). Did you only read the part about the documentation?

I doubt the author was using Redux if he was praising React and Typescript...

Re: Opinionated Comparison of React, Angular2, and Aurelia

#74

My key to success with react-router was to use context and redux to get props to the routed components. Sub-components from there can accept props directly. After a while it feels natural - any necessary information is stored in the store.

This is an anti-pattern unless you actually have shared state between pages. Otherwise it's functionally no different to just having local state on each page and all you have is lots of unnecessary boilerplate.

This is way more common than I realised before I started working in teams. Each page does it's own API calls to the server (either directly, or more commonly through some sort of horrible misuse of redux-thunk), stores the data in it's own little section of the redux store, and then receives the exact same data back as props :/

Re: Opinionated Comparison of React, Angular2, and Aurelia

#75
post #71
post #59

Earlier quoted context omitted.

Everything in react is done in the template language. This react below is not JavaScript... it's a reverse template language with a mix of not-quite-html and not-quite-JavaScript. jQuery style code is nicer than that! I hate the enterprise boilerplate in react projects. No wonder they're all failing! class Square extends React.Component { constructor() { super(); this.state = { value: null, }; } render() { return ( t…

JSX is not a template language, it is just syntax sugar: see it as a different way to write javascript: https://facebook.github.io/react/docs/jsx-in-depth.html you can't say the same about templates.

It's not JavaScript, and it mixes in almost-html... but it's not a template language?

Wrong. It's a template language, even if Facebook tells you otherwise.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#76
post #57

Earlier quoted context omitted.

The vue looks good. Yeah, Vue.js is for people who make things. React is for enterprises who don't seem to mind being 3 months late shipping basic stuff. In react everything is done in the template language. It's a sort of reverse template language, that doesn't even really use proper html for things. So weird. Vue is just all together, and is based on web standards. Not a weird thing by facebook enterprise developer…

Ah, so jQuery spaghetti has now been replaced by React messes. I can also contribute that I've seen some Angular abominations and - a year or two back - some baleful Backbone projects. It's almost like whatever the framework or the library you give developers to use, regardless of its quality or scope, they're capable of making a mess with it! Hard to imagine, I know.

Except Vue projects seem to be succeeding. This is good for clients, but bad for freelancers getting paid lots to clean up messes.

The good components, and the docs are the biggest reasons. But also it's a very well thought through thing based on web specs, using html technology. People can get useful work done almost right away, and what they made is self contained by default, limiting their damage. It also works for the document case, AND the single page app case. Want to make a landing page that converts well? Vue has your back. Want to use that one jQuery plugin, because it's awesome... Vue can do that easily - it plays nice with others.

React should copy it more, and copy web standards more.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#78
post #76

Earlier quoted context omitted.

Ah, so jQuery spaghetti has now been replaced by React messes. I can also contribute that I've seen some Angular abominations and - a year or two back - some baleful Backbone projects. It's almost like whatever the framework or the library you give developers to use, regardless of its quality or scope, they're capable of making a mess with it! Hard to imagine, I know.

Except Vue projects seem to be succeeding. This is good for clients, but bad for freelancers getting paid lots to clean up messes. The good components, and the docs are the biggest reasons. But also it's a very well thought through thing based on web specs, using html technology. People can get useful work done almost right away, and what they made is self contained by default, limiting their damage. It also works fo…

Speaking of evangelists...

Re: Opinionated Comparison of React, Angular2, and Aurelia

#79
post #78
post #76

Earlier quoted context omitted.

Except Vue projects seem to be succeeding. This is good for clients, but bad for freelancers getting paid lots to clean up messes. The good components, and the docs are the biggest reasons. But also it's a very well thought through thing based on web specs, using html technology. People can get useful work done almost right away, and what they made is self contained by default, limiting their damage. It also works fo…

Speaking of evangelists...

I'm happily cleaning up react messes :) As my dads plumber friend used to say... "There's money in shit!".

Fair cop. Not sure why I'm participating in a JavaScript framework internet discussion. I wish people would concentrate on standards, and apps.

Re: Opinionated Comparison of React, Angular2, and Aurelia

#80
post #59
post #50

Earlier quoted context omitted.

In React there are no templates, just component trees.

Everything in react is done in the template language. This react below is not JavaScript... it's a reverse template language with a mix of not-quite-html and not-quite-JavaScript. jQuery style code is nicer than that! I hate the enterprise boilerplate in react projects. No wonder they're all failing! class Square extends React.Component { constructor() { super(); this.state = { value: null, }; } render() { return ( t…

If you don't like the "boilerplate" of a single class definition, use a functional component, which is just a function that returns JSX, that is also a component. It could literally not be more straightforward.

Or could you not hear me over the sound of that axe you're grinding? :)

Post reply on HN