Switching from Angular to React
Ah, the crazy world of Javascript frameworks and libraries. As you navigate through them, pick one to learn and eventually become somewhat efficient, a new, flavor-of-the-week framework or library comes out that becomes the new hotness.
All your efforts seem in vain. I worked as a fullstack intern, barely knowledgable in Javascript, as I hopped on to Angular 5 in my internship. I had taken a course on Udemy, as my internship started halfway through the Angular course.
Making sense of the entire codebase, and learning Angular side-by-side felt like a daunting, yet fun task. The mistake I had made was to not dive deep into Javascript before thinking of learning Angular.
Angular is pretty powerful. It's a full-blown framework that provides routing, services, dependency injection, RxJS, Observables out of the box, which is pretty great.
The Angular CLI is also quite useful, as you can generate components, modules and services with simple commands.
Angular felt complicated and it did take me quite a while to get the hang of it, and it felt quite slow, given that it would reload the entire app even on a single change, though I loved the separation of concerns as well as the feature of each component having it's own template, logic and CSS file.
Tutorials were another issue; every tutorial used a different style of writing code in Angular, which made it a headache. The buzz around React was at an all-time high, and there were nearly endless job openings for React as compared to Angular.
Once my internship got over, I decided to learn React, given the job demand. And boy, it was a nightmare. JSX was a completely alien concept to me, and it felt weird mixing HTML, Javascript and CSS all in one file. Managing state manually was tiring(Angular had it's own change detection strategy to manage state) - keeping track of props and state was absolute madness.
I loved how React felt closer to Javascript, whereas Angular (which is written in Typescript) felt very close to C#. I disliked how CSS styles aren't scoped to components like in Angular. React being a view library doesn't provide routing, etc out of the box, so one has a lot of freedom to chose what routing library to integrate with React, for example. This is both a pro and a con.
Then came the time for learning Redux. From all the articles I had read, Redux was complicated. Actions, dispatchers, reducers, etc, etc..all these seemed overwhelming.
But now, I love using React & Redux. It feels way less complicated than Angular, and debugging is much more easier.
Switching from Angular to React was one hell of a challenge, as I was unlearning whatever I had learnt, but it was worth it.