r/webdev • • Jul 11 '16

React.JS or Angular.JS ?

http://www.discoversdk.com/compare/react-vs-angularjs#/product-comparisons
11 Upvotes

32 comments sorted by

3

u/[deleted] Jul 11 '16 edited Jul 11 '16

Stop comparing React and Angular, you can't. One is a view framework the other a full SPA framework.

Generally I would advise to use Angular 2 just for speed of development and speed of the framework since Angular 2 is miles ahead of React esp. on mobile as you can swap out the whole GUI (even for React Native or even Native Java/Swift rendering) and the whole framework can live in web workers.

2

u/TheCallMeRalph Jul 11 '16

I totally understand where your'e coming from but some people don't really understand the basic differences between the two. I think the post answers exactly that, as an intermediate user this is great.

2

u/[deleted] Jul 11 '16

Angular 2 is miles ahead of React esp. on mobile as you can swap out the whole GUI

This is news to me, do you have some sources I can read about this?

5

u/[deleted] Jul 11 '16 edited Jul 11 '16

https://www.nativescript.org/nativescript-is-how-you-build-native-mobile-apps-with-angular

http://angularjs.blogspot.de/2016/04/angular-2-react-native.html

The angular team works really close with the native script team (which is actually faster and has better support in my experience but I only played around and did nothing serious)

edit: Why exactly was I downvoted? Please elaborate

4

u/kagevf Jul 11 '16

Someone asked you a question and you answered it. Have an upvote.

3

u/[deleted] Jul 12 '16

I'm not sure who downvoted you but it wasn't me. Thanks for providing the info, will check it out.

13

u/Skwai Jul 11 '16

I vote Vue.js. It's a great middle ground between the two.

9

u/trout_fucker 🐟 Jul 11 '16

Do you write in Vue in Vim while eating a Gluten-Free Vegan sandwich before you run out to do your WOD for Crossfit?

3

u/[deleted] Jul 11 '16

I laughed harder at this sentence than I should have

1

u/trentcleftmore Jul 11 '16

I get that bringing in Gluten and WOD / CrossFit are your way of accusing this dude of being a hypebeast, but how the f does Vim fit in any of that??

1

u/tendollarburrito Jul 11 '16

I recently discovered Vue and it really is a lovely, well-thought out library that, with Vuex, vue-router, and vue-resource, builds up to a full framework without getting in its own way. I'll be very interested to see how it fares over the next year or so.

3

u/Gnashe Jul 11 '16

Interesting article. I like the tone of it. A lot of people are just going to read the title and not the article and get mad though.

However, for any newer person reading the comments, I would say to you, please first read the article, then please also consider Ember.js

The community is great, the cli is great, and it favors convention so as you move from shop to shop you can feel comfortable sitting down at a new codebase.

3

u/otherstark Jul 11 '16

I recall seeing this graph on performance of several frameworks - Ember was by far the worst: http://www.stefankrause.net/js-frameworks-benchmark2/webdriver-java/table.html

2

u/Gnashe Jul 11 '16

This is a good point. That is definitely an area Ember struggles in.

However, my original positive points still stand. All about balancing what your stack does for you to fit your needs. If it was all about performance over convention/modularity/opinions then we would all be using vanilla js in all our projects.

1

u/mattaugamer expert Jul 12 '16

Benchmarks need to be taken as only a small piece of a decision making process. How many projects actually need to display 10,000 rows? If your project requires extremely large data sets and an extremely large interface changing thousands of times... Sure you might be better off with something else. But I've never in my life built an interface with any such requirements, and I doubt most developers have either. If you're optimising for these extremes it's at best premature optimisation.

I'm not saying these benchmarks are nothing. Core devs in frameworks will be looking at numbers like this and trying to see where they can make improvements. I know Ember is - Glimmer 2 is already in progress, and has performance close to or higher than React in a lot of areas.

But from a developer point of view, there are a lot of things I value more highly in a framework than raw numbers.

1

u/mattaugamer expert Jul 12 '16

Yeah, I'd second this. Ember is an amazing way to build SPAs. Great tooling, great ecosystem.

0

u/siamthailand Jul 11 '16

Ember? What year is it?

1

u/mattaugamer expert Jul 12 '16

Ember has a lot of features that other frameworks are yet to catch up with or only doing so now, such as a highly functional CLI.

3

u/schism__ Jul 11 '16

I have zero experience with React, though two of my friends work with it full time and they're "relatively happy" with their environment.

I just finished my first major project with Angular 2, and I am exceedingly satisfied. More than anything, TypeScript has allowed me to get beyond my historical point of, "this project is too big, I need a break." And of course shelfing the project for 3 months as a result.

2

u/Sicks3144 Jul 11 '16

I'd say React, but I'm hugely biased due to only a passing familiarity with Angular.

From a distance, though, it's easy to see that both are very capable in their target markets.

2

u/siamthailand Jul 11 '16

I'd go with VueJS, unless I need to use Redux, then it's React all the way.

1

u/tendollarburrito Jul 11 '16

Have you tried Vuex?

1

u/siamthailand Jul 11 '16

Nope

1

u/tendollarburrito Jul 11 '16

Ah right, I was going to ask why you preferred React over Vue when it has Vuex (its own Redux-style approach). Worth a look if you prefer Vue :-)

2

u/siamthailand Jul 11 '16

I can still answer that question. First framework I used was KnockoutJS, and I absolutely love it for its simplicity. No webpack, no bullshit, simple as hell.

VueJS is simply an improvement, IMO, over KnockoutJS. I actually haven't used it in a large project, but hopefully will.

1

u/chocomilkz full-stack Jul 12 '16

Sweet. I haven't seen a blogpost like this before!

-1

u/Marketeering Jul 11 '16

Easy. AngularJS over React any day!

0

u/[deleted] Jul 11 '16

[deleted]

3

u/CptAmerica85 Jul 11 '16

Facebook isn't a huge project?

0

u/[deleted] Jul 11 '16

[deleted]

2

u/Sicks3144 Jul 12 '16

Is /u/CptAmerica85 butthurt? Or would "butthurt" be a better description of someone who launches into insults with no provocation?

2

u/CptAmerica85 Jul 12 '16

I'm butthurt by asking a question? That's pretty funny, because your response makes it seem like you're the one who's butthurt. You wouldn't choose react, cool story. I don't use react, I've played with it just a little bit. I just know that it was created by a company that has probably the largest scale project/site in the world, so for you to say something that would make react not appear that it's good for something it was designed for, I asked a question. And you responded with an answer, that it wouldn't be your personal preference if the project was large. Fine, I get it. Then you edit your comment to add an insult by calling me an idiot and say that I'm butthurt. What? How does that even make sense to jump to that conclusion? It sounds like you were butthurt just by me asking a question.

Way to handle a discussion like a professional. If you can't handle people questioning your advice or thoughts, maybe you shouldn't post on reddit. It's also not very nice to randomly lash out and insult someone's intelligence, just in case nobody has ever taught you that lesson.

1

u/freudianGrip Jul 11 '16

Why would you not choose React for a huge project? I find that it allows you to stay very well-organized and forces you to write in a way that allows for easy testing.

1

u/[deleted] Jul 12 '16

I don't like mixing stuff up, I don't want to think too much, angular brings all the important aspect out of the box.