A war is being fought in the hearts and minds of web developers over the next-generation single page application (SPA) frameworks. This conflict is less one of feature set and more of style and aesthetic. There are numerous minor players in this conflict, but two real contenders have stepped to the fore and they are two of the biggest on the web – Google and Facebook.
Google was ostensibly first in this space, with their wildly popular AngularJS framework. Thinking that they would consolidate their influence, they’ve spent the last three years crafting a true next-generation framework in Angular 2. It would leverage off modern component based design to improve their architecture, use TypeScript for tooling and future-proofing, provide the ability to run outside of a browser process and ahead-of-time compilation foremost among many features. While it was a significant departure from the style of Angular 1, they took their time to craft a truly impressive framework.
Three years is a lifetime on the web and Facebook prescribes to a different school of thought. React had already been released by the time Google announced the rewrite, but it was a really good component-based UI framework – in no way as feature rich as angular. Then came flux as a pattern, redux as a framework, babel for transpiling, react-native, relay and flow for type checking. The procession of complementary technologies continues at an implacable pace. React is still just a UI framework, but is surrounded by such a wealth of supporting libraries that make it more than just another contender.
This war is far from over and knowing the way-of-the-web, there will likely be more contenders rising to the top soon. In our context, the recommended choice is between these two best-of-breed frameworks. They’re both similar in their breadth of functionality and learning curve, but very different in their aesthetics and style. The key takeaway is likely that Angular 2 supports a more object-oriented style whereas react encourages a more functional approach.