Top 5 Reasons to React to your apps in Reactive way

  1. VIRTUAL DOM:
    ReactJS uses Virtual DOM which is a lightweight copy of the actual DOM. So, for every object that exists in the real DOM, there exists a copy in the virtual DOM. Each time there is state change in the application, the virtual DOM gets updated first. Whenever there is any change in the element, a new virtual DOM is created. The new virtual DOM is then compared to the previous DOM and makes a note of the changes. After this, React.js finds the best possible ways to make changes to the real DOM. This enables the update of UI in an efficient way. React uses batch updates, the updates to the DOM are sent in batch wise. The re-rendering of UI is the costliest and React.js finds the best way to do it.
  2. LAZY LOADING:
    React apps are bundles with preinstalled bundlers like webpack to make it production ready. When this bundled project is loaded, the entire source code is loaded, even the pages which are not visited frequently by users is also visited which increases the DOM time and decreases the speed of the application. To resolve this problem React has a concept of Lazy loading where the component can be lazily loaded on requirement basis and the DOM is updated accordingly
  3. ONE WAY DATA BINDING:
    React’s flow of data is unidirectional, the developers are forced to make use of the callback functionality to make edit instead of directly editing them.
  4. COMPOSABILITY:
    React.js is a component driven architecture. For example, there can a profile component, irrespective of different details of a person to be displayed, we can make use of the same component this reducing the repetition of code. Each and every page can be made and designed as a component and can be rendered with props passed from parent to child component using the Parent Child communication property of React.
  5. Support for external libraries:
    React being a library itself, can support usage of other libraries to build our applications. We can use third party libraries into our applications and React supports it. There is also a controversy here that React not being a framework and library and we have to use some external libraries in order to achieve some functionality which you might require in your apps. But I consider this as an advantage since we can use any third part libraries and React.js is flexible enough to support it equally.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store