Wednesday, January 17, 2018

React Virtual DOM explained...


React maintains a Virtual DOM Object, to which we can write state changes and render instructions.

Whenever there is a need to render a change in View based on a state change, the Virtual DOM first updates itself and then compares its state (visual state) to that of the actual DOM and efficiently changes the actual DOM at those places where the change is required. This is achieved with one way data binding approach in React.

In Angular and Ember we have two way data binding, which blindly redraws the entire actual DOM whenever there is a change in state.

This makes React better in performance compared to other frameworks.


No comments:

Post a Comment