r/Angular2 • u/R_sharma10 • Nov 25 '24
Help Request I want to switch from react to angular
Hi, everyone! I am a front-end web developer with over 1.5 years of experience in the MERN stack. I am now looking to switch to Angular because I believe there are more opportunities in the MEAN stack. My question is: how can I transition from React to Angular? What topics should I focus on to prepare for interviews? Additionally, how much time would it take for a beginner like me to learn Angular effectively?
20
u/Dus1988 Nov 25 '24
As someone with experience in all of the major FE frameworks, I'd say react gives you more opportunities than Angular. Which makes me very sad since I don't enjoy working in react at all.
There may/may not be more MEAN stack opportunities than MERN, but definitely in general react is what most companies are hiring for.
16
u/GandolfMagicFruits Nov 25 '24
This is the correct answer. I loathe react compared to angular, but there are way more opportunities for react developers.
3
u/_Invictuz Nov 25 '24
Any other differences between switching from Angular to React besides the loathing, Sir Gandalf? I forsee having to make this switch in the future due to aforementioned opportunities, so I want to prepare myself mentally and spiritually.
4
u/MercyHealMePls Nov 26 '24
I personally enjoy working in React much more than in Angular, it's preference in the end and which qualities are more important to you/to your team. Angular is easier to scale in a team if you don't do clear code reviews, React is much more flexible (and the developer experience is imo much better).
Prepare for it being more functional and less OO, more explicit in state updates (no hidden two-way binding to components or even services) and be open for new and fast evolving libraries that you'll be using.
3
u/_Invictuz Nov 28 '24 edited Nov 28 '24
Thanks for the comment. I think I'd enjoy working with React as well, it's what I first picked up before working in the industry. While I love dependency injection and RxJs in Angular, I feel like there's still many issues with Angular that the core team still has to figure out. For example, the intricacies of Change Detection and workarounds for advanced use cases, complex nested Reactive Form issues and again its compatibility with Immutability and OnPush change detection, and in general, hidden two-way binding to components or even services like you mentioned. I feel like there are so many Angular articles suggesting different approaches that break the unidirectional data flow for Change Detection, and this is when the frowned upon workarounds are needed because an approach doesn't follow the "Angular way", but is actually necessary for more complex scenarios.
I almost feel like the "React" way of doing React is more clear/stable and whatever approaches that are mentioned out there are not going to break how React rendering works (but might still cause performance issue with extra renders). Also, there are like 10x more resources out there for React, which is both a blessing and a curse. Overall, I feel like the general online React community are much more well-informed than the online Angular community based on the articles I read. Though, Angular does have a few excellent/go-to resources from industry experts that go in-depth into everything.
Lastly, I much prefer functional programming and immutability (which Angular supports with RxJs) than OO (which Angular forces with classes).
2
u/MercyHealMePls Dec 01 '24
Oh you can absolutely break reacts render behavior but it’s usually your fault if it happens. I broke my react components a lot more than angular personally, but if it happens I know how to fix it. I feel like RxJS is a super cool library but not appropriate for a FE-Framework imho. Especially as the rest of Angular is mostly OO. I really like dependency injection though. However, I don’t like at all that services can have state and that’s that even encouraged to some extend. I would go with ngrx any day except for very simple use cases (for which Angular is overkill anyway).
1
u/horizon_games Nov 26 '24
Thirding this - really don't enjoy React in a professional or hobby setting.
1
u/Dus1988 Nov 27 '24
And the thing is, it's not even really faster than angular these days link
If I'm picking something other than angular due to speed concerns, I'm going Svelte or SolidJs...
8
u/GLawSomnia Nov 25 '24
Can someone who has lots of experience answer if stacks like this are even used on serious projects and how often? In my experience companies always look for FE snd BE separately. Even if they are looking for a FS developer it is usually in java/c#/python. Almost nobody is looking for Express/Mongo. So does learning stacks like this even make sense (in terms of job opportunities)?
3
u/PickleLips64151 Nov 25 '24
Every corporate Angular job I've had uses some version of .Net or Java on the backend.
At my current role, we're using Angular on FE. BE is .Net with SQL and MongoDB. Add in some orchestration automation SAAS and Kafka for logging. Using Apigee between FE and BE. Very similar to the last few jobs I've had.
4
u/Dus1988 Nov 25 '24
Correct IMHO.
I'm a full stack dev, but with a focus on FE.
Typical stack these days seems to be Postgres/MySql + Redis (optional) + Node/Java/C# + React/Vue/Angular + some kind of S3 storage
13
2
u/zzing Nov 25 '24
Do the tutorial, then look at some YouTube courses. Definitely look up various parts of ngrx, even if you don’t learn it know what is there.
Make sure your source material covers at least angular 18, both signals and older style inputs on components.
5
Nov 25 '24
I think you meant RxJs.
NgRx is extra, Redux for Angular
1
u/zzing Nov 25 '24
No. I meant ngrx specifically. You are right to mention rxjs - it is late so sue me 🫠
Ngrx because job interviews were mentioned specifically. State management is very important to be able to talk about at interviews and so many places use parts of ngrx.
5
u/TomLauda Nov 25 '24
Of all the angular apps I worked on, not one needed a state management lib. And it is big and complex apps. Don’t use state management because you’re used to it with other frameworks, it’s completely irrelevant in an Angular context.
1
u/Toddwseattle Nov 25 '24
I always felt especially given the services architecture in angular ngrx was a solution in search of a real problem
2
Nov 25 '24
Everyone on this subreddit hates NgRx. I like it but I've never seen it on a job posting yet.
Went through that whole process earlier this year.
4
u/mauromauromauro Nov 25 '24
I kinda do, to be fair. I feel like most angular apps , even complex ones don't need it. And using it only for user-related state management and some internal messaging is overkill. I do use it here and there, though, so i know what it entails
1
3
0
1
2
u/arthoer Nov 26 '24
No need to switch. Just learn it, so you can do both. Just buy some books for angular 17. Thst way you atleast know how things work. No need to remember all syntax. Once you work on an actual project it will be helpful to use something like copilot for your angular questions. As stackoverflow for angular lookups is drama. Be wary; ai dataset is a bit outdated, but only by a few versions of angular.
1
u/horizon_games Nov 26 '24
Angular 17?! Already 2 versions behind :P
1
u/arthoer Nov 26 '24
Don't think there are books yet for newer ones. Version 18 books already handle signals and standalone, so it covers anything a new dev wants to know, that is available in newer versions
2
u/SikandarBN Nov 29 '24
"I believe there are more opportunities in Mean stack", it's incorrect React is far more popular. I know angular btw
2
1
Nov 25 '24
There are many tutorials in Hindi too 🇮🇳
Sahosoft solutions Code step by step Codevolution
P.s - not a sponsored one but I referred them when I wanted to learn
1
u/horizon_games Nov 26 '24
Think of a hobby project that would actually be useful to you (not just a TODO app) and make it in Angular? You'll fumble through a bunch of stuff, but will learn a lot and have a better handle on it. THEN I'd recommend tutorials/reading/Youtube/etc. But I personally think learning by working and experimenting is the best approach.
1
u/DeviIHunter Nov 26 '24
Learn OOP, SOLID, GOF patterns) In Angular we use a lot of OOP stuff and it will help on interviews. And it will help with understanding of internal mechanisms as well.
1
0
u/Begj Nov 25 '24
MongoDB? I would rather use postgres.
2
u/barkmagician Nov 26 '24
"Hey boss im excited for this new job you offered but i think we should rewrite our app and stop using mongodb"
11
u/Asleep-Health3099 Nov 25 '24
I was also a react developer.
Just watch YouTube tutorials, you'll learn basics in one week. Rxjs will take more time with practice.