virtual DOM and why is it used in libraries/frameworks?
Answer
<div class="counter">
<h1>0</h1>
<button>-</button>
<button>+</button>
</div>{
nodeName: "div",
attributes: { class: "counter" },
children: [
{
nodeName: "h1",
attributes: {},
children: [0]
},
{
nodeName: "button",
attributes: {},
children: ["-"]
},
{
nodeName: "button",
attributes: {},
children: ["+"]
}
]
}Good to hear
Additional links
PreviousWhat are refs in React? When should they be used?NextWhat does the following code evaluate to?
Last updated