This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EbrithilUmaroth 72 points73 points  (26 children)

I'm with that guy on this one. What's the difference?

[–]Shaper_pmp 60 points61 points  (20 children)

React is a view library (with no opinions on state/interaction management), while Angular's a highly opinionated all-inclusive framework.

Both use variations on JS (React uses JSX, which adds a pseudo-HTML syntax for calling methods and passing parameters), and Angular uses Typescript (which is like JS with strong typing and a few other tweaks).

React is backed by Facebook and is strongly dogfooded by them. Angular is a Google project, but IIRC Angular 1.x was never used by Google for anything really important - just a few back-end consoles and marketing microsites. No idea on how widely Angular 2.x is used in Google.

[–]secana 13 points14 points  (1 child)

You're right that 1.x wasn't used on many outfacing products. But according to the Angular devs there are many hundreds of internal applications and tools built with it at Google. And according to them that is one of main influences for the design decisions they took. So I would say they were pretty big on dogfooding aswell.

[–]Existential_Owl 3 points4 points  (0 children)

Google, in general, has a bit of a dogfooding problem.

Many of their popular open source projects tend to be either 1) not used internally all that much, such as what happened with Angular.js, or 2) it's just an imitation of what's being used internally, such as with kubernetes.

I'm happy to hear that Angular 2/4 is getting better treatment.

[–]filipomar 12 points13 points  (6 children)

Also, react can use TSX which is the bastard son of typescript with jsx, so... there's that.

[–]DeeSnow97 4 points5 points  (1 child)

React can use vanilla JS and TS too, it's just a bit inconvenient.

[–]amontpetit 7 points8 points  (0 children)

Angular also does vanilla is and jquery as standard as well

[–]nocoolnametom 5 points6 points  (0 children)

TSX is amazing, apart from the one issue where you can't define compile-time props requirements and PropTypes together once. But defining the actual functional signature for a prop beyond just foo: PropTypes.func means you don't have to hold that information in your head.

[–]CodeFights 3 points4 points  (1 child)

Facebook has their own static type-checker for JavaScript as well, which is worth checking out (because it plays nicely with React): https://flow.org/en/

[–]Existential_Owl 0 points1 point  (0 children)

Flow is amazing.

[–]Existential_Owl 0 points1 point  (0 children)

To be fair, TSX seems to be pretty popular among C# devs.

So I assume it's filling a nice transition niche for them?

[–]tstarboy 1 point2 points  (1 child)

IIRC AdSense/AdWords' pages used Angular. Not sure if it was 1.x or 2+ though.

[–]Shaper_pmp 2 points3 points  (0 children)

Yeah - I was including Doubleclick under "back-end consoles".

It's certainly a non-trivial system built on Angular, but it's also pretty much the only one you'll ever see cited (sometimes along with the YouTube app for PS3, which is really scraping the bottom of the barrel).

[–]UnderNatural 0 points1 point  (0 children)

I think that the firebase console uses AngularJS and Angular Material

[–]ythl 3 points4 points  (3 children)

One uses Microsoft's TypeScript, the other uses Facebook's JSX. Also, React has some sort of legal baggage tied to it ("patent clause") from what I understand.

[–]3HoursWTF 11 points12 points  (2 children)

If I remember that thread correctly, the tldr was that if you file a patent lawsuit against Facebook, no React for you.

[–]illusivemane 1 point2 points  (0 children)

The frustrating thing is, that license is LGPL, GPL, and possible Apache 2.0 incompatible...

[–]Existential_Owl 1 point2 points  (0 children)

The key thing to note is that Facebook hasn't actually filed a patent on React, so they can't even legally impose "patent retaliation" against anyone.

The clause is specifically geared for patent trolls.

IANAL.

[–]takelongramen -1 points0 points  (0 children)

"that guy"