News


Why React is more popular than AngularJS?

React Vs AngularJS

There are two reasons for the shift from AngularJS over to React. First, and the one that triggered interest, is speed. React was much faster and more memory efficient than AngularJS.

The second reason is more expansive and is what carried React into the stratosphere. Basically, the conception of React is more in-line with where the modern web is going.

AngularJS was born from the first era of web application development. It was mainly focused on the DOM. Coders wrote HTML and CSS then attached functionality to it with JavaScript. jQuery is nothing more than a DOM manipulation library, and AngularJS was literally to be what HTML would have been like if it had been created with applications in mind. The DOM was paramount.

React rejects the DOM as a thing. Instead, all that exists is the JavaScript application — the state of the application that outputs the DOM. The DOM is a result, not a thing. That is a massive paradigm shift. Suddenly, web pages are genuine applications. React was mostly used in the countries like USA, United Kingdom, Canada, Singapore. In the Regional Index, except India, all countries have using React more than Angular JS.

React VS Angular

Architectural concept of React was also more elegant and easier to understand. AngularJS relied on dirty-checking, where every component in the application was checked for changes ten times. It was a huge kluge (rhyming unintentional) and was slow as molasses with large DOMs.

React instead maintains a DOM state that is just a big JavaScript object. When the user does something, React creates a new DOM object and compares it to the old one. Any differences are then rendered to the UI. This is very easy to understand and very elegant.

This new philosophy now dominates and AngularJS has been completely obviated. Vue, Ember, Angular 2+ all rely on some sort of virtual DOM or another, even though their change detection schemes are different. This new era has pushed frameworks to speeds that were unimaginable just two years ago, and much of this transition is thanks to React.


Comments are closed.