React and Angular often come up in the same conversations and there are often comparisons between the two. A shallow dive into the documentation will expose notable differences and quickly demonstrate why they might belong in separate discussions.
According to Wikipedia, Angular exists "to address many of the challenges encountered in developing single-page applications." Brad Green, a Google engineering director, says that 1.3 million developers use AngularJS and 300 thousand are already using the soon to be released Angular 2. It is a widely accepted and utilized framework. Angular has been described as an MVC Framework with two-way data binding. But with the release of Angular 2, it is described as a component based framework. Angular is open source and maintained by Google.
According to React, "React is a JavaScript library for building user interfaces." Kamil Przeorski at ReactJS.co notes the wild rise in popularity of React. React - often lumped in with JavaScript frameworks - is actually a library. And on further inspection we find that React is really just the view layer. It is a fast, dynamic way to build a single page of what is essentially just HTML. React is open source and maintained by Facebook.
Angular has a complicated recent history. Angular2 is a complete rewrite of Angular. In the months preceding its release, Przeorski noticed, developers seemed hesitant to start new projects. And though Angular2 boasts that developers can use ES5, ES6 and Dart, many in the community feel like they are bound to TypeScript, which feels restrictive. Lastly, Angular utilized two way data building, but that is not built into Angular2, and this is another area of speculation for the latest release. Two way data building is powerful, but can be slower and more difficult to reason about. But that is a discussion for another time.
With React we can create stateless components that can be used over and over. But what works really well is the Virtual DOM. The Virtual DOM is something React handles under the hood. React takes all the components we have built and assembles them on the Virtual DOM. Then it takes a look at the 'real DOM' and compares the two. Instead of replacing the 'real DOM' with the Virtual DOM, React looks at the two and compares the differences. For example: If there is a one-word difference, React will replace only that one word. This is very efficient. React is also readable, maintainable, and it follows a pattern that is not difficult to adapt.
In time we will learn more about the adoption and popularity of Angular2. Until then we will continue to watch the rise of React with it's compelling features and versatility. For now, amidst the changes in the Angular world, React finds a very popular spot. Moving forward we can keep in mind what React has to offer:
- Components - the ability to create reusable components appears to be where web development is going.
- Efficiency - the use of the Virtual DOM makes React very efficient.
- Versatility - React is independent and can be used on top of existing frameworks like Backbone.
- Writability - JSX is a readable 'HTML' style syntax that makes writing React easier.
- Mobile - Though different that React, React Native uses the same design patterns to develop for mobile.
For more on React & Angular checkout this post from EffectiveUI.com
Made updates based on comments from @Laner12.