React vs Angular

Yahjaira Vasquez
3 min readOct 20, 2020

Are you starting a new project and unsure whether to use React or Angular? Or maybe you are looking to learn something new to add to your resume. Whatever the case, today I am here to discuss some of the prime differences between the popular React and Angular.

Photo by Nicole Wolf on Unsplash

Let’s start off with some basic knowledge. Both Angular and React are open sourced, but Angular is a Javascript framework written in Typescript by Google, while React is a Javascript library written in JSX by Facebook. Angular has been around a little longer than React, as it was released in 2010 and React was released in 2013, but both languages are pretty mature, which makes them a more reliable.

Something to consider especially if you are venturing into something new is debugging and the learning curve. For Angular, I would say there is a bit more of a learning curve because you must learn how to use Typescript, as this library was built using typescript. But, despite the learning cure, the debugging process with Angular is definitely more forgiving, as Angular tends to give clear error messages. React, on the other hand, has less of a learning curve, as it is built using JSX ( a merge of Javascript and HTML). But the downside is the error messages, as they are not always as clear and helpful as they are with Angular, which can be very frustrating during the debugging process at times.

Photo by Christopher Gower on Unsplash

A big differentiator between the two is DOM. Angular utilizes a real DOM. This means that every time a change is made, the entire DOM is reloaded. This can slow down runtime. Also, Angular is a large library, causing slower speeds as well. React utilizes a virtual DOM, which provided a solution to the slower speeds caused by real DOM. A virtual DOM is faster than a real DOM because only the elements for which changes were made are reloaded as opposed to reloading the entire DOM. React is also a smaller library, adding to the speed of the library.

These were just a few of the differences between Angular and React. Both libraries have its strengths and weaknesses, it is up to you to decide which would be more beneficial to you and/or your project. But a general rule of thumb is that React is best used for single page applications that may experience frequent changes, whereas Angular is best for larger scale applications. Until next time, Happy Coding!

Photo by Prateek Katyal on Unsplash

--

--

Yahjaira Vasquez

Seeking and spreading knowledge within the world of tech!