5 ms·
TL;DR: The author thinks that React is amazing at everything, but detests JSX. Conversely, he hates Angular but loves Angular's directives. So he hacked toge
by Lazare 11y ago
TL;DR: The author thinks that React is amazing at everything, but detests JSX. Conversely, he hates Angular but loves Angular's directives. So he hacked together some code that lets him use Angular directives with React, which he thinks is great and everyone else in the world detests.
If you are one of the handful of people who love React, hate JSX, love Angula's directives, but hate Angular...then you will find this article very agreeable. Everyone else will react with a mixture of laughter and confusion.
Sadly, the actual writing and argumentation is poor; if you don't already agree with the author's rather unique point of view, this article certainly won't convince you. It's basically just a puff piece so he can link to his directives-in-React library; eg, important debates about two-way versus one-way binding are dismissed with a quick "React has a mixin for that", which rather misses the point. (Of course, to really discuss this, you'd need to mention Flux, which is studiously ignores, probably because it would distract from his obsession with templates.)
In short: I don't think the author understands React, and I doubt they understand Angular either.
- acconrad 11y ago> The author thinks that React is amazing at everything, but detests JSX. Conversely, he hates Angular but loves Angular's directives. The hilarious part about this statement is that React is the equivalent of the Directive component in Angular...so if you like Angular Directives, there's basically no reason to use React. I'm seriously wondering why this post got so many upvotes.
- karmajunkie 11y agoI'm stuck on an older version of angular, but have directives become more composable in the last couple of versions? I had real problems composing them as element directives, which is the only way i'd be able to swallow the equivalence argument.
- jmkni 11y agoYes they have, everything is gearing towards component-based architecture in the more recent versions of Angular, and 2.0 is going to be all about components. This is a good read - http://teropa.info/blog/2014/10/24/how-ive-improved-my-angular-apps-by-banning-ng-controller.html http://teropa.info/blog/2014/10/24/how-ive-improved-my-angul...
- acconrad 11y agoWhich is funny because Google is also sponsoring Web Components (via Polymer), so I wouldn't be surprised if Angular is one grand experiment to see if the world will adopt data-bound web components as the next step in the evolution of the web.
- lucisferre 11y agoSorry can you elaborate? How have they become more composable? I don't recall a point at least post 1.X where they were more or less useful for composition than they are now.
- jmkni 11y agoSure, there are a lot of subtle things which have been improved in later Angular versions. First of all, you don't need $scope anymore in controllers, you can still use it for functions like $watch, but you don't need to inject it in just to add properties to your controller, you can just use `this.foo = 'bar';` You also have the controllerAs syntax which I don't think is present in earlier Angular versions, which provides a shorthand for your controller, and bindToController for directives, which allows you to bind attribute values directly to the directives controller without extra syntax. If I remember other things I will update this comment.
- netghost 11y agoIt has the words React AND Angular in the title. Instant upvote for folks I suppose.
- jhpriestley 11y agoThis comment really lowers the level of conversation compared to the article. Shame on you.
- tcfunk 11y agoI would disagree. I don't think the "level of conversion" presented in the article is anything to praise. There are very few real arguments presented that are worth discussion.
- mst 11y ago> Sadly, the actual writing and argumentation is poor Hard for me to tell, since you seem to have devoted your entire comment to insulting the author without actually elaborating on why he's wrong. From my POV, this looks like a better way of letting HTML people focus on HTML while I focus on the JS - which is something that's been valuable in angular for me. Any chance you could explain why you believe that's wrong rather than just trying to invent teabagging over IP?
- logingone 11y agoYou have HTML people? This raises a question I've had for a while about the "full stack" term. I come from the asp.net world, where I have never dealt with the concept of "full stack", simply because there has never been an alternative. From day one in the 90s I've been expected to do everything from html to sql. Is "full stack" primarily a non-Microsoft matter? If not, what proportion of Ms devs have HTML people, js people, etc. vs "full stack"?
- mst 11y agoWell ... I usually bang out HTML3-like markup that matches the initial wireframes, then hand it to somebody who's good at CSS to make it look decent. I also do a fair chunk of refactoring JS stuff that was thrown together to test a UI idea into something that's actually maintainable. Plus on the rare occasions I try and do something involving prettiness, being able to ignore the JS and focus on HTML+CSS is nice for me, too.
- Lazare 11y ago> Hard for me to tell, since you seem to have devoted your entire comment to insulting the author without actually elaborating on why he's wrong. Most of the article doesn't make any concrete arguments, so there's nothing to dispute. Most of the article boils down to "React is magical and better at Angular at everything", which...I dunno, where do you even start? The point about learning curves is just a bald "you can be an expert at React in a week; you have to read the Angular source to even use it!", which is just blatantly and obviously wrong. Or the abstraction point; apparently Angular is bad because you need to know about its internals to make anything work, but React is good because you just need to know about its internals to make everything work. There's nothing really to engage with there. If you think React is super easy to master, and Angular is super hard, then you'll nod in agreement. If you don't think that—and I don't, for all that I love React and dislike Angular—there's nothing to dispute. No studies, no anecdotes, no surveys. > this looks like a better way of letting HTML people focus on HTML while I focus on the JS My experience has been that any designer technical enough to write HTML using Angular directives is technical enough to write JSX; the complexity difference is minimal. But your mileage will vary; perhaps you—or the designers you work with—are fine with Angular directives but not JSX. Adoptions of tools like React-templates suggests this is not widespread, however. :)