React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

Choosing between Angular 2 and React.js midway through to 2016

React.js and the accompanying ecosystem has gained huge momentum since it's launch in 2013. During 2015 the ecosystem was in a constant state of change and Angular was amidst a huge change. So now midway through to 2016, what should you choose and why?

Many React projects are starting to standardise on Babel, WebPack, Redux and React Router. Meanwhile the Angular team has been doing big strides to modernise their framework. Angular 2 has now reached Release Candidate status and it's maturing fast.

Angular continues on the path of being a complete application development framework, where as React itself continues to be a UI library with many associated projects for application development.

Angular 2 and React are both modern JavaScript

For developers comfortable with modern JavaScript both of these are a great solution as the React ecosystem widely uses Babel to transpile code from ES6 / ECMAScript 2015 to ES5. For Angular this is similar, but they are using a Microsoft originating technology called TypeScript.

TypeScript is not a complete language by itself, but just a layer ontop of JavaScript providing Type Checking at compile time using type annotations. In essence it has grown to be a very similar tool to Babel and with the Angular community embracing it, the future looks bright for TypeScript.

Both React and Angular are embracing the use of components, so in this way both are very similar to each other. Unfortunately neither of these is a straight implementation of any standard like Web Components as those are not yet mature and feature complete enough.

Out of the box tooling for Angular 2 is better

Out of the two Angular 2 is definitely more of a product. It's a complete set of components tied together in a certain way. With the Ember.js inspired Angular CLI tool it's easy to setup a uniform layout for a project that is built by the recommendations of the development team itself, straight out of the Official Angular 2 Style Guide.

For React there are numerous boilerplates with a number of different application methods and tools available. This makes starting React development a harder task than Angular 2 development. Not that the development itself is harder or more complex, but there is rather an abundance of choice and no clear direction. For experts well versed in React and JavaScript development this freedom is great, though.

As mentioned earlier the React ecosystem has matured significantly in the last year with a few prominent supporting elements that are de-facto usability. With much of breaking changes behind us in the world of React Router and such, the developer experience for new developers is bound to be better.

You can't really go wrong with either React or Angular 2

Both projects are backed up by corporate giants (Facebook and Google) and will be around for years to come. React has a massive user base, but as a new project Angular 2 also boasts a strong brand and a large developer base currently using Angular 1.

Both of the tools can do the same things and performance for most tasks is adequate and with access to the expressiveness of JavaScript both can be bent to do quite a number of things. As in many cases before, it all boils down to preferences.

If you're working on a large project that already uses Angular, it's likely that transition to Angular 2 in the future will be easier with the built-in migration tools. On the other hand for new projects React.js is likely be better established now and not learning a new template syntax like in Angular, but using vanilla JavaScript (together with JSX) is considered as an advantage by many.

Currently the only sure fire way to lose is to use both React.js and Angular 2 on the same project.