5 ms·
I agree with the article's main point. In the market share fight between React and Angular, React has won — and for good reason, I think. Angular 4 is an impro
by erokar 9y ago
I agree with the article's main point. In the market share fight between React and Angular, React has won — and for good reason, I think.
Angular 4 is an improvement over Angular 1.x, but Angular's main problem is still needless complexity, both in syntax and concepts added by the framework, and a totalitarian approach, in the sense that Angular seems to want to replace vanilla JavaScript/DOM/Browser API's with it's own slightly different and unnecessary versions. What you learn developing in Angular is therefore specific to Angular and not transferable to other domains. Personally I find that depressing and demotivating.
Angular 4's HTML templating syntax is terrible. I get the feeling the deliberately set out to make it as complex and inconsistent as possible — it's hard to phantom how else they ended up with such a mess.
Angular seems to have been inspired by the worst of Java EE from days of yore, it's riddled with needless complexity and ceremony. No one should have to work with that with the nice alternatives we have today.
- stupidcar 9y agoIt's bizarre that you would complain about Angular replacing vanilla JS/DOM/Browser APIS and then say React is better. React literally replaces HTML and the DOM with its own XML dialect and virtual DOM. This means that, until recently, you couldn't use CSS Grid in React components, because every single CSS property that you want to pass through JSX needs to be explicitly whitelisted[1]. No other front-end framework has gone as far as React in trying to replace the vanilla web platform with its own technology and idioms. [1] https://github.com/facebook/react/pull/9185 https://github.com/facebook/react/pull/9185 Angular's new template and component syntax have a learning curve. But they retain a far closer mapping to what's actually alive in the browser's DOM. A component instance actually wraps a native element, instead of being a function that emits a tree of objects that eventually get turned into DOM elements by some opaque virtual DOM process. When you grok what the syntax means, it's actually a rather elegant way of expressing binding to the HTML element properties and attributes and between component instances. There are arguments for and against both approaches, but I don't see anyone on the React side of things even trying to understand them. Instead, they dismiss Angular's approach based on five minutes spent scanning syntax examples, and adopt a cult-like mindset that React is the silver-bullet for software development, and that alternative approaches are wrong and evil, and that anyone who uses them or likes them is stupid and/pr incompetent. It's a very arrogant and unpleasant attitude.
- tuan 9y ago>> React literally replaces HTML and the DOM with its own XML dialect and virtual DOM. This is one thing I don't like about React. If my intention is to create an HTML template, I would like to use HTML to do that, not through another layer of indirection (JSX). >> No other front-end framework has gone as far as React in trying to replace the vanilla web platform with its own technology and idioms. I think Angular does something similar with zonejs while trying to patch every javascript async function. I just don't like this approach at all. Because of this, while using Angular, I have to keep in the back of my head that the setTimeout function that I'm calling is not the native setTimeout function. Most of the time I don't have to worry about it, but it still bothers me.
- robwormald 9y agoYou'll be pleased to know that we're making Zones optional pretty soon here. This would mean taking control of change detection yourself, of course, but there's plenty of valid use cases where that's a reasonable idea.
- uptownJimmy 9y ago"In the market share fight between React and Angular, React has won...." All the data I've seen indicate that both Angulars, combined, account for twice as many production code bases as React. I wonder where you got the idea that "React has won"?
- darkmagnus 9y agoHyperbole
- StevePerkins 9y ago... and non-SPA, full-page-load-driven, jQuery-based web apps dwarf BOTH by an order of magnitude, even in 2017. You're just not going to receive many blog clicks or discussion forum upvotes by pointing that out. "Won" usually means, "the thing that people most want to read or talk about at the moment".
- uptownJimmy 9y agoActually, the same data indicates that jQuery is around 45% market share as the primary front-end JS tool. That's almost exactly the market share of both Angulars and React combined. And yes, this represents a steep drop-off in the number of jQuery-centric applications in the past couple of years. Edit: I thought I had bookmarked the Web site where I saw these numbers, but I couldn't find it before running out the door this morning. Suffice it to say, the JS landscape is changing rapidly, and assumptions that were safe even 12 months ago are not valid today. jQuery is fading quite rapidly, and though it won't disappear any time soon, and, increasingly, it is no longer seen as a good choice for large apps with tons of business logic.
- baybal2 9y agoI used to make close to 90k a year at the hight of Web 2.0 mass hysteria with nothing more than few animation and dynamic loading tricks. Life has gotten toughter since then
- StevePerkins 9y ago
- jinder 9y ago> In the market share fight between React and Angular, React has won — and for good reason, I think. I think HN members often forget that there is a whole world of software development outside of the big tech giants and startups. Often the tooling and frameworks used there is very different.
- baybal2 9y agoHere I will say that Angular 1 still wins over Angular versions made after transition to typescript. The biggest win for Angular 1 was push for code reusability throught enforced modularity. This matters a lot for both "big co." and "outsourcing sweatshop" type collectives. To defeat React, Angular guys will need to defeat Angular 1.x first