A React developer learning Angular – 2 months experience

I love React! I worked with React JS and React Native for over 3 years and it gets better every release. Currently, the project I work on in IBM is based on Angular and I spent the past 2 months learning it. I tried Angular JS many years ago before learning React and I gave up after first day. It was just too confusing for me and it didn’t make sense at all.

Having experience with React now, it was a lot easier to decide on how to structure and develop my apps. The problem is that I keep thinking the React way of doing things and I feel this is a disadvantage.

Learning curve

Learning React was easy because it is just a library compared to Angular which is a library. Things start to become difficult when you need modules for different things and need to learn those.

Since Angular comes with a lot more functionalities and new concepts which don’t exist in the React world, it was more difficult to learn.

Time spent building a simple app

I spent about 2 days getting a first simple React app with Redux doing some async api calls. Doing the same thing in Angular took me at least double the time.

Getting used to the syntax

React is just Javascript ES6+ which is great since you don’t have to learn anything new. In Angular you will have to use Typescript which is very straightforward to learn. The great thing about this is that editors will show you the type errors while coding before you actually run the app. React comes with Flow if you want type checking, but it doesn’t force you to use it.

Unit testing

In React you can use Jest and Enzyme to get unit tests done. It only took me a couple of hours to learn these and get some tests done. Angular is using Protractor for unit testing. After 2 months I still get blocked on tests with some new errors. I found it much harder to debug the tests in Angular.

Productiveness

I feel more productive while I’m working with React. Everything just works without much debugging needed. I know I only spent 2 months with Angular so far but I still feel overwhelmed and less productive with all these new concepts. Writing new components is not as pleasant in Angular.

Boilerplate

There is just a couple of lines for React compared to Angular which needs a lot more. If you’re using Redux in React for state management, it requires a lot more boilerplate than Ngrx which is the Angular version of Redux.

Debugging

In React there is the React Devtools which is really powerfull, while in Angular there is Augury which is also very good, so no complain here.

Communities

I find the React community a lot larger than Angular. All the questions and issues I had in React were already answered.

Overall experience

It is a pleasure to write React components. Writing Angular components is not bad at all but not as good as React. I have to agree that Angular shines more than React in some areas like form handling, routing and not requiring many npm dependencioes. A downside for React is that most of the times I end up with too many dependencies and is hard to keep them up to date.

Andy

Front-end Engineer & Designer based in Dublin currently working @IBM.
I write about: Javascript, HTML, CSS, React JS, React Native and UI/UX Design.

Add comment