Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

virtual dom explained

The virtual DOM (VDOM) is a programming concept where “virtual”, representation of a UI is kept in memory and synced with the “real” DOM by a library such as ReactDOM.
The virtual DOM is used for efficient re-rendering of the DOM
React aims to re-render the virtual tree only when the state changes
Uses 2 virtual trees (new and previous) to find differences and batch update real DOM
Whenever possible, does not update entire component in real DOM - only computes a patch operation that updates part of the DOM
Comment

What is Virtual DOM?

React keeps a lighweight representaion of the Real DOM in the memory.

When you make some change, the virtual DOM only changes the specific 
object in the dom instead all of the objects.

Virtual Dom understands which area needs to send the update and 
avoids the other areas.
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to show 1 to 10 odd numbers in javascript 
Javascript :: toggle boolean js 
Javascript :: First non repeating character position in a string 
Javascript :: syntax function 
Javascript :: react native navigation navigate 
Javascript :: react app js 
Javascript :: javascript get 1 hour from now 
Javascript :: redis nodejs 
Javascript :: javascript arrow functions default parameter 
Javascript :: how to limit characters in number input js 
Javascript :: disable mixed content via javascript 
Javascript :: lyrics api 
Javascript :: js and 
Javascript :: nodejs event 
Javascript :: convert mongodb timestamp to date javascript 
Javascript :: how to send enter event to input field jquery 
Javascript :: saving text in javascript 
Javascript :: Page Height Bottom 
Javascript :: responsive calc height react native 
Javascript :: react state array 
Javascript :: array length javascript 
Javascript :: json stringify close circle 
Javascript :: or inside if javascript 
Javascript :: jquery form serialize object 
Javascript :: uselocation react 
Javascript :: check every value in array javascript 
Javascript :: add numbers in array 
Javascript :: reset div jquery 
Javascript :: angular library run tests 
Javascript :: convert an array to string javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =