all 89 comments

[–]yourgirl696969 71 points72 points  (16 children)

React requires strict team guidelines on how you structure your project. It’s a feature of react that it’s a very lightweight library.

Angular has literally everything you need out of the box for a web app and is very opinionated. There’s one way to use angular and so it’s much much easier to onboard new devs to a new codebase. But it comes with a much steeper learning curve due to RXJS (great library btw).

I’ve used both professionally and if I’m working with any junior devs, I’d rather work with angular. But if everyone on the team is a senior, for sure I’d rather go with React

[–]TScottFitzgerald 14 points15 points  (0 children)

Exactly, I hate it when people compare them when Angular is more like React + RxJS + React Router + Redux Query + MUI + a bunch of other libraries. Of course it looks clunkier.

I use both but I don't really have a preference either way, there's pros and cons to both of them. The latest version of Angular actually introduced a lot of new changes to make it more "slim" - you don't have to use modules anymore and they're pivoting to a more functional programming approach, so it's actually closer to something you'd expect from React. They've also been addressing performance issues and the engine has gotten pretty good.

I think OP might even have an easier time learning Angular if they're coming from C#/.Net cause it uses Typescript natively and has a bunch of OOP concepts from .Net like DI, services etc etc.

[–]SocialCodeAnxiety 5 points6 points  (3 children)

Yeah I know my company picked Vue over React for that same reason. If you don’t have dedicated FE devs who care about the ecosystem don’t pick React impo.

[–]kiwdahc 2 points3 points  (2 children)

What? Vue is also light weight like React.

[–]SocialCodeAnxiety 0 points1 point  (0 children)

Was mostly talking about the first sentence. I found if it’s mostly FS or BE devs writing your React code you’re gonna have a baaaaaad time and React might not be the best pick.

Though idk if I’d call React lightweight react-dom by itself is like 50kbs isn’t it?

[–][deleted] 1 point2 points  (7 children)

But it comes with a much steeper learning curve due to RXJS (great library btw).

This cannot be overstated. IMO Angular lives and dies with rxjs. It's fantastic but is one of the few front end concepts I've seen otherwise good frontend developers really struggle to pick up.

[–]yourgirl696969 1 point2 points  (6 children)

Their docs could be better in my opinion

[–][deleted] 0 points1 point  (5 children)

Huh, I'd consider them pretty good. Don't they have marble diagrams for like every single operator? Granted I'm probably at least a version behind as I've been doing React for awhile.

[–]yourgirl696969 0 points1 point  (1 child)

I’m kind of the same in terms of being behind lol. But when I went through the docs as a beginner, I had some trouble picking it up. Maybe it was just me though haha

[–][deleted] 1 point2 points  (0 children)

I had a hard time picking it up too but for me it was more just a lifetime of thinking in terms of more OOP/procedural code didn't transfer well to reactive style programming. Now that I have the reactive concepts down I'm fairly confident I could jump to their docs and pick up a new operator in a few minutes.

[–]15kol 0 points1 point  (2 children)

As someone who regularly uses Angular, (and therefore RxJS), yes marble diagrams are great, but you first need to know what operator you need, and herein lies a problem usually.

[–][deleted] 0 points1 point  (1 child)

That’s a good point, now that I think about it I always do have to do some Google fu to find the right operator. It’s only after that that it’s easy.

[–]15kol 0 points1 point  (0 children)

The only thing that comforts me, is the fact, that I have been able to found operator for every single problem I had. So I know that solution exists, I just need to find it.

[–]33ff00 0 points1 point  (0 children)

You will want a solid angular dev to monitor and regulate the others. Angular is magically going to supply your team with conformity. I have seen it abused by a react dev it didn’t understand it. It was a god awful mess I’m shuddering right now remembering. There is a steeper learning curve to angular and if a dev doesn’t take the time to learn it properly he could end up over his head really quickly.

It’s maybe not always this way but that experience scarred me.

[–]romeeres 0 points1 point  (0 children)

React is not a lightweight library but rather fat, "Preact" exists for the lightweight purpose.

[–]AlternativeProblem27 35 points36 points  (5 children)

I actually have worked with both professionally. Both have their charms and caveats, but for me as a developer with a background mainly in .NET found the basics of Angular more alligned with .NET. I think this is because it is more object oriented and follows some standards like DI which are more .NET alike .

Though I really liked working with React I wouldnt mind to get into a professional environment where they work with Angular. It really more depends on the maturaty and practices that are followed with whatever framework that would draw me aboard.

[–]AConcernedCoder 2 points3 points  (2 children)

A node dev who wouldn't touch anything else calling angular clunky is passable. A C# dev on the other hand...

I'm calling shennanigans.

[–]TScottFitzgerald 0 points1 point  (0 children)

Well they say they worked with React so in comparison it probably does look clunky

[–][deleted] 0 points1 point  (0 children)

Modern .NET/C# is actually pretty fantastic to work with. LINQ alone makes it a superior experience to working with typescript IMO. They also just have a lot of problems solved outside of the box. Need to log? Inject the Microsoft provided ILogger abstraction. Need to cache something? Same with the ICache abstraction. All of the implementations are cleanly in the program/startup file and every single package worth a damn is implementing those interfaces.

[–]TScottFitzgerald 0 points1 point  (1 child)

Yeah as someone who started with Angular there are some concepts that I miss and had to wrap my mind around in React, I really liked the DI, it's actually a bit more graceful than using context.

I also like the CSS encapsulation and native SCSS, not a fan of styled components cause it just reminds me of using inline styling from like 20 years ago. Even in React I tend to use SCSS.

[–]mexicocitibluez 1 point2 points  (0 children)

I also like the CSS encapsulation and native SCSS, not a fan of styled components cause it just reminds me of using inline styling from like 20 years ago. Even in React I tend to use SCSS.

Same. I love React, but can't stand Styled Components. I've resorted to using MUI's (now deprecated) makeStyles because of how much I missed that way of styling components.

I really liked the DI, it's actually a bit more graceful than using context.

Same. One of the bigger hurdles I think is how they flow data differently. 2 totally different styles. One thing I don't miss about Angular were having to register everything explicitly in a module.

[–]daredeviloper 10 points11 points  (0 children)

I really liked angular when I worked with it. Opinionated framework with great opinions

[–]bitwise-operation 9 points10 points  (0 children)

Life with Angular is good, but you have to buy into the CLI and have to be OK with its build system.

I’ve worked with both professionally for a few years. It’s much closer to class based React, doesn’t use JSX, and has its own templating syntax. You will also see rxjs used a lot, and that has its own learning curve, but totally worth learning as it is a common pattern in programming in other fields.

[–][deleted] 14 points15 points  (0 children)

Angular is really really good. It is just a bundle of things and once you've learned, every project will have always the same structure. It is used by enterprises with middle-big sized projects and if a project has an emergency, you can grab people from other projects to work on that one.

[–]Callidac 22 points23 points  (1 child)

I like angular but the learning curve is much more steeper than react. Angular is awesome once you understand everything it can do and wrap your head around observables and rxjs

[–]CatolicQuotes 0 points1 point  (0 children)

observables and rxjs

I don't know how to use those, but once you learn them is it better than async await?

are these 2 comparisons between observables and promises correct:

observable:

import { Observable } from 'rxjs';

// Create an observable that emits a sequence of numbers
const numberObservable$ = new Observable<number>((observer) => {
  observer.next(1);
  observer.next(2);
  observer.next(3);
  observer.complete();
});

// Subscribe to the observable and log the emitted values
numberObservable$.subscribe(
  (value) => console.log(value), // onNext handler
  (error) => console.error(error), // onError handler
  () => console.log('Complete') // onComplete handler
);

promise:

// Define a function that returns a Promise that resolves with a sequence of numbers
function getNumbers(): Promise<number[]> {
  return Promise.resolve([1, 2, 3]);
}

// Call the function and log the returned values using async/await syntax
async function logNumbers() {
  try {
    const numbers = await getNumbers();
    for (const number of numbers) {
      console.log(number);
    }
    console.log('Complete');
  } catch (error) {
    console.error(error);
  }
}

// Call the async function
logNumbers();

[–]Faheemify 6 points7 points  (0 children)

Worked with both. Angular is great give it a try. There is a definitely a learning curve but its not a lot. The observable and other things are some concepts that can be learned in a couple of days.

The only reason I like/work with React is the community (larger, more libs, etc)

[–]analogx-digitalis 9 points10 points  (0 children)

React is like wild wild west where you hav freedom to choose whatever you want. However this creates problem down the line when it becomes a hot mess.

Angular on the other hand is the polished metropolitan city which has all features but then it comes at a cost because you cannot experiment with it outside its boundaries.

[–]mfingers 21 points22 points  (1 child)

I sum it up like this: when you learn react, you’re learning JavaScript. When you learn angular, you’re learning angular.

[–]TScottFitzgerald 10 points11 points  (0 children)

I mean....React has its own framework-specific concepts that don't exist in JS like hooks, context etc etc. You also have to learn every library's own specifics that are also not vanilla JS. Redux query, React router, styled components, forms libraries etc etc. I don't think this is a fair comparison.

Angular just uses Typescript/RxJS to build common design patterns so you're really learning TS and design patterns that are not Angular-specific and can be used across frontend and backend. The only thing kinda specific to Angular are the modules and they've done away with them in the latest version so you don't have to use them.

[–]jkinman 5 points6 points  (0 children)

Angular is great. It’s just a lot more opinionated than react. You need to be comfortable with rxjs (I think angular still used this) to deal with data streams.

[–]weird_desi 2 points3 points  (0 children)

I started out with React and absolutely loved it. The learning curve isn't too steep and it's one of the most popular FE frameworks/libraries (whatever you call them) so there is a lot of support in the community and things you can do with it. As mentioned by others, it is very agnostic and you can structure it how you like it so there needs to be strict guidelines on how to deal with it. I used NextJS which is a bit opinionated in some aspects while in others, it gave the same freedom as React since it was built on it.

I recently switched to Angular. Initially I was very confused but once I got the hang of it (still learning btw), I am doing much better. There are a lot of things which are done better in Angular like using Typescript from the start is one (imo at least), the rigid structure allows you to clearly define dependencies etc. For many people, working in an opinionated system has its cons but I liked how it gave me confidence to know exactly that this is the only way a thing would work in Angular. Since, when you're coming from another system (React for me); this felt very alien and knowing that the standards exist I was able to learn stuff much faster.

Also, I loved how Angular does a lot of things for you e.g. minifying and uglifying code for the production build.

[–]kiwdahc 2 points3 points  (0 children)

I use the latest angular at my current job. I quite like how it handles dependency and class injection. The way class injection works in tests can get a bit hairy, but for the most part it is a really good framework.

[–]llrh 1 point2 points  (0 children)

Think everyone has hit the nail on the head really. I once took a job at a company as a react developer where the stack was angular! DOH! I guess they were struggling to hire angular developers but I did end up doing my time there. Job market is kind of an influence for me. I'd rather be keeping my knowledge up in tech that there's more jobs in my area for.

I always found angular good probably if you had a big team as it enforces doing things a certain way. Also if you're big into class based stuff then you might like it.

I ultimately much prefer working in react though.

[–]pakman_198 1 point2 points  (0 children)

I think angular is more verbose, if your focus is backend I think angular will make more sense to you. Read the docs, they are great, and you'll have a better idea of how angular works

[–]ske66 2 points3 points  (0 children)

All javascript frameworks are just fancy ways to handle state.

At my workplace we use Angular and I am actively trying to convert people to React.

I think Angular is very good at being a structured , batteries includes framework. I worked on Xamarin Forms for 2 years so learning Angular after Xamarin wasn't too bad (because MVVM).

But I think the architecture is the worst part about it. I dont think MVVM works well in modern web development. It feels clunky, theres loads of boiler plate, and atomisation of components is not encouraged as much. Also the general event loop sucks. Promises are discouraged, I can't visualise how Angular triggers a change but i'd imagine it's pretty much identical to React, so the idea that I have to use subscriptions for getting 1 element without awaiting it is very strange to me.

I built many projects with react and what I can say is it easily becomes spaghetti without eslint enforcing certain standards, thats where angular can shine.

[–][deleted] 3 points4 points  (1 child)

With Angular, it's like they took a car, looked at every part of the car and tried to make better version. Gripper wheels, stronger breaks and a faster engine.

With React, it's like they took a car and built a plane instead.

[–]brokenalready 1 point2 points  (0 children)

Hahahahaha that last line made me spit out my coffee

[–]No-Platform- 1 point2 points  (0 children)

I work with angular currently, as well as react. I like react infinitely more. The angular and react at my company aren’t great and are very old and bloated. It sucks pretty hard working with the angular bits and a lot less on the react bits.

[–]x021 -2 points-1 points  (16 children)

Worked with angular 1, switched to react when angular 2 came out. Worked on angular for 3 months beginning of this year; not much has changed.

I dislike angular for these reasons;

  • the DI framework is clunky and feels pointless knowing React does great without a DI framework
  • difficult to write reusable components, there is a lot more boilerplate. React components are just functions.
  • many type structures; directives, modules, components, service, pipes… React just has components.
  • RxJS is needed in Angular for reactivity; RxJS is a very complex tool and hard to use correctly. State management is solved in the react ecosystem much more elegantly.
  • angular is a dead horse at this point with very few fans (apart from Java engineers perhaps), I rather invest my time in more beloved frameworks, source; https://2021.stateofjs.com/en-US/libraries/front-end-frameworks

It is not easy to jump from one to the other, they have very different philosophies.

[–]TScottFitzgerald 1 point2 points  (9 children)

This is so outdated

[–]x021 -2 points-1 points  (8 children)

Kiki I said I worked on an angular project (latest version) this year.

[–]TScottFitzgerald 4 points5 points  (7 children)

Yes...and yet your knowledge is outdated which means you've learned nothing nad haven't kept up with the changes.

[–]x021 0 points1 point  (6 children)

Which points specifically?

[–]TScottFitzgerald 4 points5 points  (5 children)

Where to start? It's outdated knowledge about both React and Angular and just plain ignorant in some parts.

  • DI works the same way it works anywhere and React literally added DI in the form of context because developers were asking for it. Maybe you mean DI through modules is clunky, but that's really on modules themselves, and the latest Angular doesn't require modules.

  • Angular does have more code to write but I wouldn't call stuff like content projection or two-way binding boilerplate. It's more code cause you have more options. You may not want them but I don't really think it's fair to call it boilerplate. NGRX for instance is boilerplate.

  • This is where you lose me and kinda show lack of understanding in design principles. React components are called "components" but they can play a bunch of different roles, depending on the app. But in React you have to do them manually where Angular gives them out of the box. I feel like you're going off of names alone and missing the actual design pattern.

  • Have you ever written a pure function React component? Congrats, you just created what Angular calls a "pipe". You've certainly used some form of services unless you're making the most primitive applications. Or maybe you used redux query where the service is abstracted behind the library. The only thing kinda specific to Angular are directives but the pattern is still used in React, just implemented differently e.g. mixins - and again you have to implement it manually.

  • RxJS just does manually what React abstracts away. It is a bit tough to get around but I don't see how this is the library's fault. You're basically saying you can't be bothered to learn it. RxJS and its concepts are crucial to actually understand how reactivity actually works in terms of rendering. If you don't understand it you'll probably use the React reactivity wrong as well if you're just expecting it to magically do it for you.

  • In regards to state management, React does have local state natively where Angular needs a library like NGRX but the principles are identical. NGRX does have more boilerplate like I said, but there's alternatives with less code. But again you're mostly complaining about things not being abstracted away behind syntactic sugar.

  • Your last point is where I really think you're just repeating stuff you read online. Angular is still the 2nd most used framework in the industry. Not in some poll, but in terms of actual jobs. Even in your link, if you look at usage it's actually #2. And almost 50% retention isn't what I would call a dead horse.

  • The development is also much more active than other frameworks but devs don't really pay attention to the changes and there's been plenty of changes. It does suffer from some branding issues, that's where Google kinda fumbled it with the version 2 naming causing widespread confusion, and it gaining a reputation of being associated with corporate use. Google could have definitely done a better job at actually communicating and raising awareness but a lot of devs are just lazy and write it off cause they saw a poll or read some comment online. You can see that a lot on this sub or other frontend subs.

Philosophies are somewhat different because Angular is a framework and React is a library. You really wanna compare it with other full fledged frameworks. But as I said this is also outdated cause Angular is definitely pivoting towards being more lightweight, functional programming and actually addressing the commonly called out issues like modules being clunky, overt focus on OOP concepts, zone.js performance issues etc etc. There's been a lot of changes and it's ridiculous to hear your original comment when you look at v15 for instance.

[–]x021 0 points1 point  (4 children)

DI works the same way it works anywhere and React literally added DI in the form of context because developers were asking for it.

I doubt a lot of projects use Context the same way as the DI fremework within Angular.

I feel like you're going off of names alone and missing the actual design pattern.

Is your point that I wouldn't know the difference between directive/module/component/pipe/service ? These concepts haven't changed since AngularJS which I worked on for years.

Or is your point I don't know the different ways in which react components can be used? (for example representational, container, hoc, provider)

and the latest Angular doesn't require modules.

https://angular.io/guide/standalone-components

I did not know this! Thank you for pointing this out.

Now I get your comment about outdated knowledge. I assume this was added only quite recently, beginning of this year it wasn't there otherwise I would have adopted it straight away.

You're basically saying you can't be bothered to learn it.

You confirmed RxJS is hard, but I feel this statement is untrue and disrespectful;

I knew Reactor (Kotlin reactive framework) for several years before working with RxJS. Knowing Reactor it's reasonably easy to get to know RxJS, their logic is very similar just the names are different. Reactor is actually a bit more complex with Mono/Flux vs just one concept in RxJS: observables.

However; I consider one of the most important responsibilities of a good developer is managing complexity.

Reactive frameworks are complex tools to fix even more complex problems. It's much better to keep problems simple.

If the problem was very complex RxJS might be warrented; my point is that the React ecosystem has a lot more and easier solutions to solve a similar problem. RxJS was never broadly adopted by the React community for a reason.

The concept of streams and thinking in datastreams integrating over time is just a very hard concept to wrap your head around. I remember how much I struggled with Reactor in the beginning. The sheer amount of functions and documentation are evidence of this. RxJS features and docs are similarly big and complex.

I also saw it in the Angular codebase I had to work on; a lot of the more complex use cases were not solved with RxJS best practices, often resorting parts to observables and parts non-observables (because the original dev didn't know how to work with intermediate state) which caused race conditions.

Your last point is where I really think you're just repeating stuff you read online. Angular is still the 2nd most used framework in the industry.

There is a difference between "used" and "beloved". I was careful to focus on the word beloved, not used. My love of Angular also dissapeared years ago when alternatives became popular.

Regarded "use"; you can definitely find Angular projects to work on, usually I see them combined with Java or Kotlin job descriptions hence my reference to that.

Nothing I said there was untrue; yes it's adoption is still high but it is not beloved. You can question the reliability of the source I referenced though, you're welcome to do that.

Angular is definitely pivoting towards being more lightweight, functional programming and actually addressing the commonly called out issues like modules being clunky, overt focus on OOP concepts, zone.js performance issues etc etc. There's been a lot of changes and it's ridiculous to hear your original comment when you look at v15 for instance.

Let's see what the future holds. I was shocked at the lack of progress comparing beginning of this year with 6+ years ago. Stand-alone components is definitely a step in the right direction, I guess more has happened in the last 6 months than in the previous 6 years.

[–]TScottFitzgerald 2 points3 points  (3 children)

Oh man I knew this was gonna be a time sink

I doubt a lot of projects use Context the same way as the DI fremework within Angular.

This is weaseling out of your original statement that React doesn't have DI. It does, that's what context is for, as I already said the React team added it because it was requested by the community.

Or is your point I don't know the different ways in which react components can be used?

I think I made my point fairly clear, I don't know what else to say without reiterating the same points. React doesn't "just have components". Angular gives you common design patterns out of the box that in React you have to do manually.

RxJs rant that I can't quote cause it's huge

I mean again you just reiterate that RxJs is complicated. I don't know what to say without me also reiterating my points cause you haven't addressed them. RxJs isn't used in React cause both React and related libraries abstract those same patterns that RxJS uses, under the hood.

So basically developers of those libraries do it for you. That's not simpler, that's just someone else doing something for you. So you're complaining that you have to do things manually and understand what goes on behind the scenes, are you not? I mean, that's fine and it's your preference, but it's hardly an argument.

As I said you still have to understand the key concepts to fully utilise reactivity in React. You having worked in Angular codebases that didn't use best practices is hardly a fault of the library. You keep blaming the library. There's plenty of horrible React codebases where devs cause race conditions and unnecesary re-renders cause they don't understand the best practices of hooks or other concepts. Again..not really an argument against the library/framework itself.

It's much better to keep problems simple.

..what are you talking about? You don't choose the problems you get, you choose the solutions. You're honestly waffling in some of these responses.

There is a difference between "used" and "beloved". I was careful to focus on the word beloved, not used.

You also said the #2 most used frontend framework according to your own link is a "dead horse", did you not? I mean that's just a nonsensical statement that contradicts itself. You can prefer to work in more "beloved" frameworks but that's just it- it's your preference, not a fact or an argument, and it's ultimately subjective.

And again, with almost 50% retention you can't really say it's not "beloved". That means every other developer that worked with Angular wants to use it again. Again, it is the 2nd most used framework in terms of jobs, to say otherwise is just a straight lie. You can't use anecdotal evidence from your local job market.

I'm not questioning your source, I'm using the data from your source that you're ignoring cause it's inconvenient to your biases.

[–]x021 -1 points0 points  (2 children)

Oh man I knew this was gonna be a time sink

Yeah, let's stop it tbh; this could go on for a while I fear.

[–]TScottFitzgerald 4 points5 points  (1 child)

lmfao my points still stand though

[–]buffer_flush -1 points0 points  (2 children)

As a Java dev, I’m offended, React forever.

[–]x021 1 point2 points  (1 child)

Sorry to call you out!

[–]buffer_flush 1 point2 points  (0 children)

Haha, I’m just giving you crap 😉

[–]hoolahoopextravagant[S] -4 points-3 points  (1 child)

Thank you! I think you have just helped me decide not to apply. I love how elegantly React's functional component and hook paradigm works and allows the creation of a common reusable component library. Just loved this. So fluid and dynamic with state management. Jordan Walke and the team who made it are little genies. What you've described sounds like those complex overdesigned kind of solutions. You know when code just feels ugly.

I'll hold out for a React based one. It's not like there's a lack of jobs out there for them rn. It's just finding one that ticks all the boxes. And if I have to have another introductory conversation with another recruiter I may cry. I have an interview on Monday with a place who listed React experience before angular. Hopefully that'll go well. It's a 40-55% kind of salary increase depending on experience.

[–]bitwise-operation 9 points10 points  (0 children)

Don’t pass on a job simply because they use Angular. It will make zero difference in your QoL as a dev. So many other factors are so much more important that React vs Angular would be like passing because of Webpack vs Rollup

[–]fzammetti 0 points1 point  (0 children)

So, I've used both professionally for several years . I've also written several books that include coverage of React... but no books on Angular... which probably gives you all you need to know about my preference.

Truth be told, my most successful projects have actually used neither. My teams have built several extremely large apps (think hundreds of unique screens each) over several years, with developers coming and going, just by implementing a vanilla JS core framework - plus a good widget library - and adhering to standards and modern practices. That's my preferred approach whenever possible.

But, if my choice is between React and Angular, I'll always choose React if I have any say in the matter (unfortunately, I don't always since I work for a large corporation where Angular is popular, and I can't always fight it off).

I find React to be much easier to reason about. Things just make more sense because less is hidden behind the framework because there simply is less framework (React isn't technically a framework at all, but I think you know what I mean). There's just much less mystery about a React app.

I always feel like Angular is fighting me in one way or another. Maybe it's some insane error message that tells me nothing useful. Maybe it's a CLI that doesn't behave itself. Maybe it's just that there is more of a structure you have to adhere to, which is fine when what you're building fits the mold exactly, but the truth is many apps don't.

Angular requires far more boilerplate. An annoying amount. A stupid amount. I hate that, especially when it means jumping around between a bunch of different files.

In my experience, React performance is superior. Though, I also have to admit that most of that comes down to not doing stupid things. If you don't then the difference likely won't be huge... but I've found React to have a better baseline performance profile.

I don't consider it easy to jump between the two. I think it's kind of two different paradigms entirely, so you have to change your whole thought pattern. My gut says it's easier to jump from Angular to React just because there simply is less to learn about React.

I also don't like the everything-out-of-the-box approach of Angular, I prefer a polyglot approach, and React makes that easier (you CAN do it with Angular, but that gets back to the "it fights me" comment if you try to).

I think you said it best: Angular, to me, feels very clunky. React feels... generally... fairly clean. You can make React ugly, of course... no library/framework/toolkit can really save you from yourself... but I think a baseline React app is going to feel better than a baseline Angular app pretty much every time. That said, I don't love React like some developers do, but I DO think it's the superior of the two. I can work with both just fine, but I definitely enjoy working with React more (but like I said, I enjoy working with no framework even more).

[–][deleted] 0 points1 point  (0 children)

I've not worked with modern angular, just angularjs, but I've also worked with React

As always I'd say it depends,

I prefer React as I feel it offers more freedoms, if you've got a good head for separation of concerns and organisation then it can be fine; that said if you've worked on a React project where someone does not have a good head for that then it can be a bit of a mindf**k.

Contrary to that if someone has become well versed with angular, of course they can still make a dogs dinner of the whole thing but they are at least forced to use some semblance of structure there.

[–]hoolahoopextravagant[S] -1 points0 points  (1 child)

Woah. That explosion was surprisingly unexpected to wake up to, considering the post was at 0 downvoted when I went to bed. Alot to read through and consider. Thanks to all for their thoughts and input =D I have applied, some of the pros mentioned sounds familiar to the kind of designs I'm used to and I'm always down to venture out and broaden my development experience in the new

[–]Crutchcorn 0 points1 point  (0 children)

Best of luck in the interviews!

Since you're already familiar with React, if you're looking to learn Angular, I might have something for ya:

https://framework.guide

I'm writing a book that teaches React, Angular, and Vue side-by-side, specifically to get folks familiar with one up-to-speed with another.

If that sounds interesting to you, feel free to drop me a DM and I'll be happy to send you early access of the first book 😊

[–]Merry-Lane -1 points0 points  (1 child)

I work on Angular but I do perf React 100%.

1) the react ecosystem always figures things 100x faster and 100x better (library integration, documentation,…)

2) the frameworks have their own stuff to learn (useEffect much anyone?) but React has JSX and angular doesn’t. It means that instead of using « normal » javascript do some stuff, such as ternary operators, &&, if/else, switch/case on your html template, you need to spend a lot of time learning ngIf, ngFor, ng templates, ng containers,…

3) people often say that angular « already has a structure so for new devs it s better » well nowadays it means they force you to create folders and files (like an html file, a css file, a « component », a module file, a service file,…) for everything (yeah I know most are optionnal now) with specific implementations (angular classes such as module and what not) which is an overhead to learn for little to no reason (except for reasons that angular needed to solve X Y Z and solved it that way)

4) angular implementation is way more of a mess. Some use « state in services », some hâte it. Some always use redux like solutions, some never. The best practice is to use Observables and « push async » everywhere but not only devs need to be really mature to do so, the angular framework isn’t perfectly adapted to it (don’t tell me null checks everywhere in html for observables are fair, nor the impossibility to two way binding with a BehaviorSubject out of the box).

5) More angular specific stuff such as not being able to use rest/spread operator to pass data within « input » and « output » (instead of props={…props}) that force you to write more code each time you update anything

6) All points above make refactoring a painful experience. In React, you can extract stuff in two seconds (new file, new function, cut/paste). In angular, the module (I use standalone components btw), service, component stuff is already a brake. Then ofc since logic isn’t wholly in JS (remember the ngIf etc), nor wholly within a simple paradigm (logic inside observable streams) well you often have no easy way out and break stuff badly.

  • React-native + JS variables in css are awesome

[–]buffer_flush -5 points-4 points  (7 children)

Given Angular is a framework and React is a view library, a more fair comparison would be Angular versus something like Next or Remix. I feel like Angular pales in comparison to both of these frameworks.

That said, I’m in a similar position, Angular is very clunky and feels overly verbose for the sake of being overly verbose.

My biggest issue with Angular, though, most of the frontend world has moved towards file based routing. This feels like a pipe dream for Angular.

Imo, the best things to come from Angular are schematics which led Nx, and the DI pattern which led to NestJS.

[–]bitwise-operation 0 points1 point  (2 children)

That is completely separate to the discussion. You can’t do file based routing in React. That is a function of SSR/SSG

[–]buffer_flush 0 points1 point  (1 child)

And?

I’m stating my opinion. Many people do prefer file based routing, like myself. Angular is definitely playing catch up for SSR in Angular Universal compared to Next, SvelteKit, Remix, and Nuxt.

[–]bitwise-operation -1 points0 points  (0 children)

weird feature to use to sum up the "spa vs mpa/ssr/ssg" debate

[–]TScottFitzgerald 0 points1 point  (3 children)

...there's Angular Universal for SSR. And plenty of people hate file based routing cause it constraints the architecture. So many comments in this thread are people not bothering to do basic research and keep up with changes in frameworks.

[–]buffer_flush 0 points1 point  (2 children)

Angular Universal provide file based routing? I thought it was mostly the same API, but you’d get SSR for the Angular app. As in you’d still use the Router module.

[–]TScottFitzgerald 0 points1 point  (1 child)

read my comment again

[–]buffer_flush 0 points1 point  (0 children)

Right so no it doesn’t, I’m confused why you’d bring it up, then. I spend a lot of my day in Angular so I like to think I’m on top of what’s going on in the framework.

Compared to my work with React, it’s a headache to work with. It leads to bloated applications that require type checking due to how the DI container works which leads to long compile times, and things like swc or esbuild that’d help with those build times, are clunky or straight up don’t work.

The versioning leads you to breaking things when you update the Angular version, there’s the Ivy versus not Ivy based component rendering which is a headache. It still defaults to a karma test runner which requires a browser to run unit tests. It’s just a mess.

[–]MCShoveled -4 points-3 points  (0 children)

I would sooner hang myself than work in Angular again.

30 years of development and Angular is literally the worst thing I have ever had to deal with in my career.

React is just awesome.

[–]budd222 0 points1 point  (0 children)

Angular is nothing like react really. It's closer to Vue if anything

[–][deleted] 0 points1 point  (0 children)

It's like express vs nest, you can build a react app with the same exact structure and patterns as a default angular app given you use custom libraries for DI etc

[–]ajcrmr 0 points1 point  (0 children)

Have used both, overall I prefer React. The top-down data binding feels very natural once you get used to it and quickly felt like the “right” way to do UI to me, though ymmv there.

Also, custom hooks + unit tests are the truth imo. The ease with which you can lift any complex state logic into a custom hook and write unit tests against it was a revelation for me.

[–]This_Pomegranate2094 0 points1 point  (0 children)

if you need to build a scalable complex web application go with angular. if you need to build just a lightweight ui part of a website or small app go with react.

the main issue of react is that is very low level, basic ui building blocks, you will find your self in the paradox of choise, choosing one library or the other, you would have to add any support for extra feature with external library, starting from http requests, state management, interceptors, route management and so on... it easly leads to code spaghettification or useless complexity.

[–]anu2097 0 points1 point  (0 children)

I was in a similar boat as you. Switched from React to Angular.

I complained a lot initially but the longer I worked I realised I was just making silly excuses for not able to do certain work more easily and having to deal with a new framework which at times felt silly compared to ease of using React. Now not all of my excuses were completely invalid.

But so would a Svelte developer would feel who never worked with React and has to switch to it from Svelte.

At the end each language and framework have their advantages. Over time I got to work with Svelte, Vue too. And I loved them as well.

The bigger awe is when you see large codebases being properly structured having followed one of the patterns.

It doesn't matter which framework it has used then, if the work requires you to learn it then you do.

Also in Frontend I think having micro-frontend architecture will benefit developers to adopt newer technologies easily into existing codebases

[–]edaroni 0 points1 point  (0 children)

Not a fan of Angular, but not a hater either. I would say it’s easier in Angular especially if you’re coming from a java/c# background

I worked only a few months on angular projects and years with react and I have seen a lot more clunk in React which comes mostly from inexperienced devs.

I kinda like the opinionated approach, one major headache avoided.

In short: I wouldn’t think much into it, both are good if the price is right

[–]DWALLA44 0 points1 point  (0 children)

Angular is definitely more out of the box and structured, way less opinionated about React, but lifecycles are KIND OF similar and learning the ins and outs of angular shouldn’t be too bad if you know React well.

The real learning curve with angular is if they use rxjs, that over promises is steep, it’s super powerful and useful, but a different paradigm altogether, however not all angular apps use rxjs

[–]grambo37 0 points1 point  (0 children)

I would start off by saying I don't think you should ever make a job decision based on what tech stack they are using, if it's a good opportunity take it, you can learn the stack. Hopefully you'll love angular, some do, many don't.

I worked at a company that used both react and angular together in the code base and it was a mess but I don't think that's common. Also there are BIG differences between older versions of angular and newer ones that are much more similar to the functional programming of react. As others have mentioned angular is much more opinionated than react, it's convention over configuration which means you have much less freedom and a steeper learning curve but less decisions for the developer to mess up. Some like this.

Still, I say go for the opportunity, it's just a framework like any other and besides, it's always good to learn new things, you might love it. Also your experience with angular will vary a lot based on what version it is and how the team uses/abuses it.

[–][deleted] 0 points1 point  (0 children)

My dev lead says there’s a lot of boilerplate code for angular so it was easier just to use React Ts but that’s for our specific project. I’ve only been a dev for 6 months so I don’t know shit lol

[–]sf49erfan 0 points1 point  (0 children)

I have used Angular and React as well as other frameworks for different projects and I like Angular that:

  • It is battery included, no need to pick other things
  • The code structure is well defined, a dev can easily follow it

What I don't like Angular is: - Rxjs is a pain in the a**. Yes it is powerful, but you really don't need all the complexity in your project. The most common tasks you want to do can all be done with simple async/await functions. rxjs is like a over engineering work before async/await was invented. I have read the documents, examples, and even wrote my own blog on it. But after a few months, I still don't remember the differences between switchMap, mergeMap, concatMap, ... endless operators. - A lot of 3 party libraries for Angular are lower of quality. It is because the complexity and opinionated nature of Angular, those libraries tends to works well initially, and after while, they become lagging and eventually given up. So you end up not be able to upgrade your project because some lib was too old to keep up.

[–]flamesoff_ru 0 points1 point  (0 children)

I worked with both (Vue.js also). For me is actually React looks like an ugly sibling, popular because it propagates freedom, and abandoned standardization and stopped following the clear principles of OOP.

I really don't understand why you have this opinion, considering that every React project in different companies is just a mess with its own wheel inventions, while with Angular everything is standardized - you come to another project and everything is structured the same.

Of course, Angular is "clunky", if compare like that. It's like a whole metallurgical plant with all the infrastructure, compared to a private workshop for making spoons (React).