Live data from Hacker News

Angular 9.0

blog.angular.io

21–30 of 308 posts

Re: Angular 9.0

#21

Why is Angular so less popular than React?

I am in no way the whole crowd, but having used both legacy AngularJS, React, and Angular 4+ in production for medium-sized apps, this is my main takeaway:

The mental model for React is much simpler than Angular's.

In React, There are two concepts one needs to understand: Components, and Hooks. JSX too, but as a web dev the HTML-like syntax was already familiar.

In Angular, you need to understand: the binding syntax; Components; Templates; Factories; Modules and Services. And learning bindings also means learning RxJS (which I love as a standalone lib, but is a big cognitive load when coupled with the rest of ng).

Even just comparing the "Fundamentals" page of Angular versus the "Main Concepts" of React (which, isn't exactly the best measure of complexity, of course, but it's A measure), you can see Angular spends 8 of its 10 sub-sections explaining essentially-required concepts, while in React it uses 6 out of 12 sub-sections.

React is much more concise in terms of concepts, and instead just has a bunch of common patterns that are sufficiently approachable and memorable, but most importantly can be "rediscovered"/"derived" on your own, rather than relying on framework-provided "black box" concepts.

Re: Angular 9.0

#22

Why is Angular so less popular than React?

I think learning curve for Angular is steep compared to React. For React, all I need to know is javascript and I can start writing components but for Angular, I must go through some documentation to get basic idea of jargon it preaches before I can do anything substantial.

Not saying one is better than other but in my opinion, entry barrier for React is lower than Angular which may be an important factor for React's popularity.

Re: Angular 9.0

#23
post #12

Why is Angular so less popular than React?

Angular: Learn about property binding, event binding, pipes, templates, views, metadata, attribute directives, structural directives, services, modules, components, injectors. React: Write a function that generates a piece of HTML. Use standard event handlers to manage user interactions. Update state via setState methods. Ship it.

Having suffered on a large Angular code based on Angular 7 and then Angular 8 for a couple of years, I just wish Angular would fucking die. Every small thing is a giant shit-pile of services, components and HTML templates that are all accidental complexity.

Re: Angular 9.0

#25
post #21

Why is Angular so less popular than React?

I am in no way the whole crowd, but having used both legacy AngularJS, React, and Angular 4+ in production for medium-sized apps, this is my main takeaway: The mental model for React is much simpler than Angular's. In React, There are two concepts one needs to understand: Components, and Hooks. JSX too, but as a web dev the HTML-like syntax was already familiar. In Angular, you need to understand: the binding syntax;…

I think that's pretty well correct, but my preference has been the opposite in terms of more concepts vs cognitive complexity. I find that to do the same stuff with react and redux and so on, you end up decoupling and abstracting in such a way that the 5 or concepts in something like Angular or Vue end up being a more manageable mental model. In the sense that the main purpose of React is lost in the weeds of trying to managing the modularity of your app.

Re: Angular 9.0

#26

I just updated my mid-size app from v8.2 to v9 with Ivy, and the total es2015 bundle size decreased from 973 KB to 669 KB. An over 31% improvement with no effort on my part!

Thats exceptional, I wonder if it was a really clever optimization they found or if it was a really lazy bloat they let into an earlier build.

It reminds me of a great hack where game developers used to hide a large memory allocation early in the game development process and when they ran into memory constraints towards launch they'd just comment out the line and instantly save the day. Artificially constraining the memory caused intermediate development to be more frugal and ultimately allowed them to get where they needed to be by the end of it.

Re: Angular 9.0

#28
post #14
post #4

Will be interesting to see how it fares in the Js Benchmarks: https://krausest.github.io/js-framework-benchmark/current.ht...

What happened to React? It's on the wrong end of almost all of those micro benchmarks. I know micro benchmarks don't tell the whole story, but when you consistently wind up on the slow end it's not a good look.

React was a mistake of the last decade. React itself is a great academic idea (i.e. pure functions, composability), but the whole React-Redux boilerplate mess (I dare not call it an "ecosystem" because that word implies harmony of some sort) is the the result of an entire generation of code monkeys and job seekers who didn't design their technology stack with any real engineering consideration, but rather on the basis of tool popularity, feeding a vicious cycle of "lean startup" companies spending a glut of VC money looking for the fastest way to hire more React code monkeys because they think "that is how you do engineering".

Re: Angular 9.0

#29
post #21

Why is Angular so less popular than React?

I am in no way the whole crowd, but having used both legacy AngularJS, React, and Angular 4+ in production for medium-sized apps, this is my main takeaway: The mental model for React is much simpler than Angular's. In React, There are two concepts one needs to understand: Components, and Hooks. JSX too, but as a web dev the HTML-like syntax was already familiar. In Angular, you need to understand: the binding syntax;…

You don't need to understand hooks to use react.

Re: Angular 9.0

#30
I just upgraded and got 'Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain".' from my S3 through CloudFront.

Seems like it's not adding 'type="text/javascript"' to in index.html. When adding this manually, everything works.

Just FYI if others upgrade and seem to get the same errors.

Post reply on HN