React versus Angular

Posted by hmelo1 on August 6, 2018

Earlier this week I started my job search and noticed that Angular(version 2 usually, AngularJS is a whole different beast) pops up almost as regularly as React. Some of you might be wondering what exactly is Angular? Well, they’re both Javascript frameworks regularly used in the front-end. However, its a bit unfair to compare them since React is relatively barebones without most of it’s libraries and Angular is a full blown framework. But they’re often compared anyways.

A quick run through of React and Angular’s history:

Angular the successor to AngularJS but don’t let that fool you. They’re almost completely incompatible. This bad-boy was designed by Google and is regularly maintained by Google. Well, at least Angular2 is. AngularJS is bieng depreciated fairly soon. A few popular websites made with Angular are Google, Eat24 and the Microsoft Office 365 OWA page.

React is developed and maintained by Facebook. A few years older than Angular (Not iincluding AngularJS, if you do they’re closer in age). A few popular websites made with React are Facebook, Instagram, and Reddit.

Okay…but how different are they to use?

A quick way to sum it up is “Angular 2 continues to put ‘JS’ into HTML. React puts ‘HTML’ into JS.”

React uses an optional preprocessor called JSX that allows you to write HTML code within your Javascript. Some find JSX a bit combursome to use. But its not too complex and just adds some Javascript funtionality ontop of HTML such as loops and other data structures. Its built on the philosophy of small reusable components.

Angular is based on TypeScript as oppoosed to React being mostly ES6. Its also more of a complet solution vs React. It also manages the whole MVC where as React only does…the V.

But what are the similarities?

Both are component based, both are based on Javascript (Angular is more TypeScript and React is mostly ES6) and thats mostly about it. Both work well for single-page applications. But they’re different beasts. What works best for a given project depends on how you use the tool

Now for the most important question, which will you choose for your next project?