Need to transform design to code? Don't hardcode it, Avocode it!
See how
GET A FREE MONTH
Code
·
LAST UPDATED
October 3, 2016

Angular 2 has been released! Does this threaten React?

Front-end developer. JavaScript enthusiast. Author of Frontendinsights.com

A few weeks ago Angular 2 was officially released. Since I am a huge fan of React but, as a front-end developer, I am interested in all new web technologies. If you read my blog, you know that I have already shown you what’s new in Angular 2. I also wrote an article for my current company’s blog where I tried to compare Angular 2 and React.

Now that Angular 2 has been released, it is time to think about the future of these two front-end technologies. Will Angular 2 be as popular as its first version? Should React be afraid of losing the position of market lead?

Please note that by saying “React” I mean the whole React “ecosystem” with some implementation of Flux, react-router, etc. And please remember that all of this is my personal opinion and you don’t have to agree with me.

The history

As usual, we can learn a lot about the current situation by looking into the history. There have been a lot of JavaScript frameworks in the past. Actually every year we have been infatuated in a different one. You can find a great meme picture on the Internet which describes it well:

History of JavaScript frameworks

Source: http://blog.bitovi.com/longevity-or-lack-thereof-in-javascript-frameworks/

But what are the similarities between these hottest frameworks? Well, I think that before the React era, every new framework was an evolution of the previous ones. But then, there was a revolution. React provided a completely different approach to what we already knew… Virtual DOM, component based, JSX, only one-way data binding. All of this completely changed how we build user interfaces. And it worked very fast! How can we not love it?

Now we have Angular 2. Is it as huge revolution as the release of React was? Frankly… I don’t think so. It is actually also component based but creating the component is more complicated. You have to use some ugly decorators. You have to define the HTML template as a string or provide a separate file. At first, I didn’t like mixing JavaScript code with JSX markup in React components but now I love it and the Angular 2 way is much more difficult for me.

Ok, Angular 2, just like its predecessor, is a completely opinionated framework so you don’t have to think what library to use for AJAX calls or for routing, etc. This might be an advantage as well as a disadvantage – the freedom to choose the library is great but also dangerous if you choose a lib which is, for example, no longer maintained. What I personally don’t like is that the architecture of the application is also opinionated and it is actually not very sophisticated:

Angular 2 architecture

Source: https://angular.io/docs/ts/latest/guide/architecture.html

Personally, I like the Flux approach, especially when implemented in Redux. I hope it will be possible to use it also in Angular 2 applications and I wonder if people will do it.

The last thing is TypeScript. This is considered the biggest advantage of using Angular 2. So why the hell is it rarely used in applications created in other frameworks? After all you can do it wherever you want! I am not saying it’s a bad idea to use static types but I think this is only really needed in huge enterprise applications – this is probably the main target group of Angular 2. I always liked the lack of type control in JavaScript – the language is, in my opinion, much more flexible thanks to it. But I understand the advantages of TypeScript and I believe there are many places where this might be crucial.

Big corporations and community

What is also important in my considerations is that both React and Angular 2 were created by teams from the biggest technology corporations. This gives us the certainty that their products will constantly be developed.

I am sure that Google will do a lot to make Angular 2 as successful as Angular 1 but I think the same about Facebook and React – they can’t afford to lose their leadership so they will keep evolving React. Apart from that they will both still support the community. I think the community of Angular 1 will probably shift onto Angular 2 so it will still be huge.

Summary

I think that the release of Angular 2 is a big thing which a lot of people were awaiting. I’m pretty sure that this new framework will be adopted enthusiastically. Angular 2 is a great framework for sure but I think it has its advantages and disadvantages. In my opinion it is not as revolutionary as React was when it came out. Thanks to using TypeScript almost natively, it will probably be welcomed with open arms by bigger companies to create huge enterprise applications.

On the other hand, some of its concepts, like the way to create components or strange looking binding attributes in HTML templates, makes me feel that they are more complicated and, in this competition, React wins.

In my opinion, we will now observe an increased hype around Angular 2 but React will stay on the mainstage for a long time. The only question is, who will take the first place?

This post was originally published as Angular 2 has been released! Does this threaten React? on Front-End Insights.com.

get guacamole
Free 3-in-1 UI kit
Are you a modern designer with taste? Get Guacamole
- a free UI kit  for Adobe Xd, Photoshop and Sketch.
Get a free UI kit
Available for: