Hacker News new | ask | show | jobs
by Uroboric 3378 days ago
I have about two years of experience with both Angular 1 and React. What was truly astounding to me was how while Angular required months of continually poring docs and Stack Overflow threads for every new thing I wanted to do, React took all of a week or two to get pretty comfortable with, and after that minor investment of time I was rewarded with dramatically increased development speed.

I will never go back to using a framework with an approach like Angular. Trying to abstract away the browser environment and have developers learn a whole new set of APIs with nearly the same level of complexity is just a fundamentally bad idea.

1 comments

Euhm. Jsx and vdom are exactly About abstracting away the browser environment...
Erm, what?

JSX doesn't do any abstraction. Unless you're using React Native, you're writing HTML, just that JSX turns it into `React.createElement(...)` calls.

The VDOM is kind of an abstraction, as React Native can use the same reconciler as React, but the React (web) VDOM is just a tree of HTML DOM nodes that gets diffed against the component rerender output and the changes are applied to the DOM.

Ummm.. kabes is right. React is an even bigger abstraction on the browser than angular 1 is. Its just that with React the abstractions are mostly opaque - and with Angular the abstractions are not so opaque ( and maybe sometimes leaky! ).
I think you got that backwards. React's abstractions are transparent, as in the developer doesn't need to "see" them or be aware of them. Your existing web dev knowledge largely applies.
> I think you got that backwards. React's abstractions are transparent, as in the developer doesn't need to "see" them or be aware of them.

He doesn't have it backwards.

He means they're "opaque" abstractions, in the sense that they're the opposite of a "Leaky Abstraction"[0]. A leaky abstraction is one wherein the abstractions below it "leak" up and you have to keep multiple abstractions in your head at once. This happens more with Angular than React.

I see what you mean by calling it a transparent abstraction though, since React's abstractions get out of your way and let you directly think about the lower level. This doesn't really fit with the Leaky abstraction analogy though, but it's a great point.

[0] https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...