It creates a Virtual DOM(aka Fake DOM) and manipulates the changes in the Virtual DOM only for those DOM element(s) that has been changed by using the DIFF Algorithm. Modificiation inside the real DOM is very costly operation as lot of time we need to Bubble up and Tunnel Down the DOM Tree. Virtual DOM selectively renders subtrees of nodes based upon state changes. It does the least amount of DOM manipulation possible in order to keep the components up to date by using the DIFF algorithm and henceforth it is fast.
Asked In: Many Interviews |