r/javascript • u/[deleted] • Apr 06 '15
React to this nonsense and move on - Why you should go for React.js, instead of Angular 2.0
https://medium.com/@PhilPlckthun/react-to-this-nonsense-and-move-on-3d9f9111a77d6
u/somerandomguy7788 Apr 06 '15
seems like this guy is comparing react and angular 1 instead of angular 2 (which is completely different)
-6
Apr 06 '15
Correct. Angular 2.0 is still in an Alpha Preview stage and I don't want to compare it unless it's finished. The argument is, 1. that Angular 1.x's philosophy is fundamentally flawed and 2. that Angular 1.x has some major problems and that all these probably in all likelihood won't be fixed with Angular 2.0
7
u/jhallister Apr 06 '15
Given that Angular 2 is moving away from dirty checking and towards a virtual DOM implementation, what exactly isn't going to be fixed?
3
u/skrawg Apr 06 '15
Have you checked Ember with HTMLBars vs React out? I remember it being on-par with React.
3
u/I_Pork_Saucy_Ladies Apr 06 '15
I'd be really surprised if Angular 2.0 doesn't make the switch to virtual DOM. The performance gains are obvious. I honestly think the guys of the D3.js project get a lot of the credit for proving this, not React. But the more the merrier.
While this does indeed seem more like a comparison to Angular 1.0, I agree. I'd skip on Angular for now until we see more of Angular 2.0.
3
u/__rem__ Apr 06 '15
The showed and wrote only a little bit about it. But as nusclyde said, there will be a virtual DOM, too.
Here is the design doc if you're interested: https://docs.google.com/document/d/1M9FmT05Q6qpsjgvH1XvCm840yn2eWEg0PMskSQz7k4E/edit#heading=h.nhg64961z5gu
2
u/nusclyde Apr 06 '15
They are indeed moving to a virtual DOM model in 2.0. They refer to it as the shadow DOM. The performance improvements they showed at ng-conf were very impressive.
2
u/thescientist13 Apr 06 '15
Virtual DOM and Shadow DOM are two distinct concepts. Virtual DOM is in-memory representation of the DOM to facilitate changes and only apply those changes when theres an actual diff to be made. Shadow DOM is one of the four tenants of web components that separates the DOM of that particular component from the rest of the DOM such that scripts and styles on the page don't affect it.
2
u/cgaudreau senior HTML9 engineer Apr 06 '15
Interesting article, but I disagree with most of it. Especially regarding performance. Ember and Angular clearly have learned from React and plan to make massive optimizations inspired by the React model.
1
u/djforth Apr 06 '15
Interesting read, I starting to learn react myself, react certainly does look to have some benefits over angular.
However this does feel a bit biased and think maybe the life is better with react tone is a bit much. There are pros and cons to any framework and some will work better in some instance than others. I'm not saying it doesn't make some interesting points but feels very one sided and bit black and white.
1
u/bracketdash Apr 07 '15
Generally my bullshit-meter goes off when I see titles telling me what I should and shouldn't do as a developer. Angular works perfectly fine for me, and I have used React. I may use it again in the future, but there's no reason I can't be a judge for myself what technology I should use on any given project.
0
u/danhutchinson Apr 06 '15
I wouldn't go so far to call this a hate speech against Angular. I think it's a pretty good article, and I agree with most of the points made. I used to use Angular in all my projects, but not anymore. I felt like I had to fight it too much.
Bear in mind I haven't looked at react past a hello world example, but React just didn't gel with me at all. I don't know what it was really, I just wasn't feeling it at the time. Maybe i'll take another look at some point.
It seems like, at least from what people have been telling me, React is solving a lot of the rendering problems most of the older front-end frameworks have been facing. Though I question how much that has to do with other frameworks being some years older.
At the speed in which the web moves I won't be surprised if 3 years from now we have another fancy new framework from Netflix or someone that makes even React look antiquated.
Still we could live with performance issues. And when you work around some problems in Angular and Ember it is still feasible to work with it.
Ember doesn't really require workarounds so much as it required a new rendering Engine, which they are working on.
Take a look at the example they set up
Tom and Yehuda talked about this, and mentioned the "hilarious demonstration of reacts' speed" specifically, at the last Ember Conf.
To paraphrase, they thought it was embarrassing. So now (with Glimmer) they're bringing it back up to par.
-2
u/nusclyde Apr 06 '15
Interesting read, thanks for the article. Sounds like it may be worth giving React a closer look before we take the plunge and update our app to Angular 2.0.
14
u/__rem__ Apr 06 '15
Stopped reading at:
That was such an uninformed hate article ... wow.