Comparing AngularJS and ReactJS for Development

Comparing AngularJS and ReactJS for Development

In the last couple years Ishantech team had a great number of various projects, among which were the ones on Angular, Angular2 and React. Because modern development trends include the use of such massive libraries, many developers argue, which one is the best. Since we worked with both AngularJS and ReactJS, we want to share our opinion, talk about pros and cons of each and give some recommendations on the best use for each library.

Few years back we started our work with AngularJS and since then we have over 50 projects, different in size and tech stack. In our work, we tend to constantly increase productivity and spend as little time as possible, at the same time delivering constant excellent results. So it is crucial that we use the best and most efficient tools and quickly decide, which ones are worth using and which ones are not.

Here is a table, in which we give pros and cons for AngularJS and ReactJS:

ProsCons
Angular·  Popular among developers·  Low cost of first UI version (С)·  Variety of tools suitable for teamwork·  Suitable for fast solutions·  High possibility of unpredictable side-effects·  Hard to scale·  Monkey/Banana problem·  Hard to get pure universal rendering
React (i.e. React + Redux)·  Easier to scale·  Predictable states (cheaper scale)·  Suitable for big front-end projects·  Relatively small API·  Limited amount of good developers·  Steep learning curve·  Base packages are community-maintained
Angular 2·  Supported by Google·  Better fit for enterprise-grade applications than React·  Base packages are maintained by Google·  Steep learning curve·  Enormous API·  Small amount of good developers(especially for A2+Typescript)

Developers tend to choose Angular over React, which is an advantage because in this scenario, it is more convenient to work with the framework. In addition, Google trends supports our opinion on Angular popularity.

We had dozens of Angular projects, and all of them had one thing in common – Angular has always been perfect for fast and relatively easy UI solutions. So, if you have an application with complex business logic, it would be better to choose React + Redux instead.

Another Angular disadvantage is high possibility of getting side effects. For example, if you get something wrong during work process, it will most definitely lead to another thing and so on. As well you will be getting more developers to work on the project, and side effects would just stack on each other. And upon scaling, it will become really easy to lose control over quality. On the contrary, no such problems appeared while working with Angular2 and React, due to predictable state containers and immutables.

Angular also has an issue that we call a monkey/banana problem. Meaning, if you want to give monkey a banana and see how monkey would deal with it, you have to build whole jungle first. Unlike Angular2, with React you can easily get more testable components because of developed ecosystem.

As for React and Angular2 cons, one of the biggest issues is lack of good developers. Despite the fact that React is quite small framework, there are still a lot of things for developers to consider: state management, interaction with sever, testing and so on.

About the author: Medhaavi Mishra