Why React is popular ?
February 26, 2019
This article is written by cellphone4ET
Why is React so Popular?
React has emerged in recent years as one of the most popular front-end libraries for web developers tasked with creating scalable and interactive UIs for web applications. What exactly has propelled React to the forefront amongst the multitude of other competing frameworks that purport to achieve similar results? What problems does React solve that many other frameworks still struggle with? In essence, what about React has made it so popular?
Ease of Learning
Components and Declarative Views
The Virtual DOM
React uses something called the virtual DOM, which solves an all-too-common problem many other frameworks and front-end libraries have of updating the DOM more than necessary. Manipulating the DOM is a slow process, and the ability to avoid unnecessary updates means your application can run faster and more responsively.
The virtual DOM is essentially a representation of the current DOM object. Instead of updating the entire DOM when a React app’s state changes, React updates the virtual DOM. This is then compared against the current state of the actual DOM, and in doing so, the exact change can be identified. React can then update the DOM to reflect only those things that have changed as opposed to updating the entire DOM.
React applications can easily be converted into native applications for mobile devices without the need to re-write much code. Although some extra skills are required to execute a React native app, the gap between React and React Native is very small. This ultimately allows web developers to easily venture into mobile web development with very little effort.