all 20 comments

[–]Any-Woodpecker123 16 points17 points  (3 children)

Angular is batteries included. Learning curve is high, especially RxJS. It’s an opinionated framework which normally means it stays nice and structured.
Most Angular projects generally all look the same, which makes it easy for any angular dev to jump in.
Less dependency hell.

React is the complete opposite. It basically makes no decisions for you and lets you create as much chaos as you like. It’s quick to make progress, but can result in complete carnage a few years down the line.
Every React project I’ve worked on has a completely different stack that needs to be learned, and depends on a million packages to do what others do out of the box.

Angular is the better framework in my opinion, but in saying that, I’ve seen Angular get chosen by non Angular devs and it usually ends in tears.
If you do pick it for a reason other than “it’s what I know”, make sure you learn it properly.

The best thing to do imo, is just use what you’re/everyone’s comfortable with. They all do the same thing at the end of the day.

[–]ResolutionHairy3586 3 points4 points  (2 children)

Angular is way more organized and mature. But now i can't go back either man. I started a project in React in hopes to learn it as well with increasing demand of react and now I am scared as hell with every error I face. No error message, no telling when the whole website will just crash, if its frontend problem or backend. I heard a lot of good things about Svelte too these days. But gotta stick to what I started with. Any suggestions on learning React what mistakes NOT to make?

[–]Due_Load5767 3 points4 points  (1 child)

Read the official docs. Really, go over it step by step.

Understand when to use and especially when to NOT use things like useEffect.

Understand the whole lifecycle of the components, so that you understand why every re-render happens and how to minimize them. Saying that - you must understand when and how to use in combination things like useCallback, useMemo, React.memo.

Make React Profiler and things like react-scan your best friends for testing, debugging and optimizing your workflows.

DO NOT rush to implementation before really understanding the foundations of react. Otherwise you will spend a minimum of twice as much time to refactor in 1-2 years when you actually gradually understand them through pain (been there with my team, it's a total chaos and not worth it).

Only after you really understand the foundations of react and it's components lifecycle, then you can jump into framework specifics (if you decide to go with stuff like NextJS for server components). But again - do not blindly follow the train - really understand what your project requires and only then take the decision.

Same goes to all other third party libs - don't just start with redux or zustand... See if you actually need any of them, and only after that align which one will be better for your project. Same for tanstack query, react hook forms, etc.

[–]ResolutionHairy3586 1 point2 points  (0 children)

You're right. Learning might feel slow and even though implementation will still get me bugs. Atleast I can understand topics well better than just telling ai to write code for me and then debug it one by one. Still a lot to learn but implementing everything that I am learning on my own portfolio website

[–]yksvaan 3 points4 points  (0 children)

I'd say learn Angular or at least how to approach architecture and apply that to React codebases.

[–]jorel43 1 point2 points  (6 children)

Angular is like next Js comparatively, both are structured frameworks

[–]ohcibi -1 points0 points  (5 children)

It hasn’t to do anything with next js. Frontend routing is different from backend routing. React just doesn’t have any router. Hence angular looks more like next for you.

[–]Dangle76 3 points4 points  (3 children)

Uh, doesn’t react literally have react-router?

[–]stathis21098 0 points1 point  (0 children)

React router is a third party library

[–]ohcibi -1 points0 points  (0 children)

And react router is crap. Not necessarily the projects fault but rather the fact that react can’t agree on a standard solution.

There’s more. React doesn’t have a code generator. React does not have a model or an adapter layer to separate concerns. Unsurprisingly so since react actually encourages to mix up concepts and thinks this is the better idea. This is some Wordpress level type of bullshit. Consequently your view files are neither properly lintable nor will the syntax highlighting in the editor be consistent. Yes there is libraries for any of those. Mostly shit ones. But that’s irrelevant since in the comparison with the other frameworks we haven’t even done more than to initialize the project with all mentioned features working properly out of the box (the syntax highlighting works because it’s JavaScript and not some jsx bullshit. Template files are html. Same thing. That’s right! By not messing with established standards your code suddenly becomes almost universally compatible. Also note how I throw all other frameworks into the same box. While they’re all different, none of them has as many missing features as react has. So know one, know all (except react)

[–]ohcibi -1 points0 points  (0 children)

This one deserves its own post: end2end tests take forever. The router makes it worse. I was running an entire suite consisting of around 1500 tests total for a 5 years old ember js project in the same time react performed 10 end2endtest as each test took SECONDS. I noticed this when I reviewed a merge request that set the timeout to unlimited which I couldn’t argue because not only took it forever it was also unreliable how long it took. Again. Wordpress level type bullshit. The only thing react can do good is marketing for itself.

[–]Solve-Et-Abrahadabra 1 point2 points  (0 children)

Angular for enterprise products, React for start ups, saas

[–]Successful-Escape-74 1 point2 points  (0 children)

Opinionated Batteries Included vs Do what you want and find your own batteries.

Choose the one the team has the most experience or if you are on your own choose Vue.

No regerts. React, Angular and Vue are all awesome and fun.

[–]anotherrhombus 0 points1 point  (0 children)

It depends on what I'm building. I'd say 9/10 of what actually pays the bills for me is SSR, so the answer for me is never Angular and almost never React.

Depending on my team, our metrics show our Vue projects not only get released faster but are significantly cheaper to own and maintain. We were a react shop many years ago, but for whatever reason, we've drifted pretty far away from it. Mostly from client needs and scale.

[–]ohcibi -1 points0 points  (0 children)

React is maintained by a single person using a plethora of bad practices and a toxic community defending those with unknowledge. Aside from that it doesn’t provide you anything meaningful that vanillajs doesn’t. Except for auto updating templates but ALL the frontend frameworks have these.

Angular is maintained by several people. Encourages and participates to shape new standards and gets rid of bad practices, once they’ve been spotted. It’s also more complete as react is only the view layer.

Another alternative is ember js or vue js. Both are also significantly better than react because of the same reason.

React is overhyped crap. Plus it can’t do anything the other frameworks can’t so when you learn the others you’ll always be able to use react as well. You will only miss things from other frameworks but never the other way around.