Recently, I looked at Facebook\'s React framework. It uses a concept called \"the Virtual DOM,\" which I didn\'t really understand.
What is the Virtual DOM? What are
let's make order and sense in this matter. React (or any other library) are a "layer" on javascript.
There is no such thing as virtual dom, there is unattached dom .
let me explain in simple javascript :
let vDom = {}; // this is a object that will be used to hold the elements
let d = document.createElement('div');
d.innerHTML = 'hi, i am a new div';
vDom['newDiv'] = d;
at this point we have created a Div which is not shown on the dom , because it has not attached
but we can access it, add attributes, values, change etc..
once we call : (for ex,add it to body)
document.body.appendChild(vDom['newDiv'])
then we will see it;
for one how saw javascript libs come and go , i suggest to any one
to do one simple thing : master JAVAscript, not layers :)