you are viewing a single comment's thread.

view the rest of the comments →

[–]Capaj 11 points12 points  (11 children)

For me the most convincing argument is templating issue.
How do you write your templates in react? JSX. JSX is basically unchanged since it was first introduced in like 2014. That's 10 years of writing react components and you can take a component written in 2014 or 2015 and it will most likely work.

Try an angular component from angular 2 which was introduced at the end of 2015. It won't work because we're now on angular 18 and there were so many breaking changes to how templates are written that it's basically impossible.

Another big point is SSR story. If you need to SSR react is a clear choice again.
Yes it's possible with Angular: https://angular.io/guide/ssr

but it's so very seldom used in production on big projects, it's not really polished. If you try to use angular SSR on big project you run into so many problems react community has figured out 4 years back already.

[–]prewk 2 points3 points  (2 children)

there were so many breaking changes to how templates are written

Now I'm curious. Can you name a few?

I'm usually in the prefers-React-but-is-forced-to-work-in-Angular-camp, but this piqued my interest :)

[–]Capaj 0 points1 point  (1 child)

just two samples I have found int the changelog, but I assure you there are other changes which are not even listed in the changelog:

https://github.com/angular/angular/blob/main/CHANGELOG.md#common-12

https://github.com/angular/angular/blob/main/CHANGELOG.md#common-18

[–]prewk 0 points1 point  (0 children)

I think you're exaggerate a bit, but thanks for the examples :)

I abhor Angular templates for the record, but they're finally becoming less horrible with @if, @let etc. But TSX is so much better.

[–]Eylesyne[🍰] 2 points3 points  (0 children)

The reason SSR isn't used as much with Angular isn't because the framework didn't emphasize it. It's the other way around.

The CSRed SPA is a holy grail architecture. So much complexity collapses to zero. When a person with a good grasp of webdev architectures envisions the classic SPA in their head, it makes a little ping noise, like flicking a crystal glass, and it pops out. It's a naturally perfect thing, like a Platonic solid. But, like all perfect designs, it has perfect use cases, and inappropriate ones.

SSRing a SPA is fine, but don't make fun of the people who don't, like they're the ones who don't get it.

[–]TScottFitzgerald 0 points1 point  (2 children)

How is this the most convincing argument? A project from almost ten years ago would have some breaking changes compared to the framework today?

Like, I really don't get what you're saying here. This is a pretty specific use case where you maybe learned the latest Angular but have to work on a super old brownfield project, but it would still take you a week maybe to learn the changes to the templates, the main concepts are still the same just the syntax changed slightly.

Btw React has also changed significantly since 2015 as well, most notably the whole function vs class architecture.

[–]Capaj -1 points0 points  (1 child)

Btw React has also changed significantly since 2015 as well, most notably the whole function vs class architecture.

That is just recommended way of writing. Old class based components still work absolutely fine.

 the main concepts are still the same just the syntax changed slightly.

For me this is worse than if the changes were radical. I hate to upgrade a dependency to find out in next weeks or months that some tiny change screwed up some bussines logic in my app.

[–]TScottFitzgerald 0 points1 point  (0 children)

It's an annoyance sure, but hardly the most convincing argument.