0 votes
in VueJS by
How is the virtual DOM works in Vue js and how is it beneficial?

1 Answer

0 votes
by
The virtual DOM is a tree-like data structure (or a collection) of JavaScript objects representing DOM nodes that are managed by Vue.js and that should be rendered on the page. These objects are called “virtual nodes” or VNodes for short.

The main purpose of the virtual DOM is faster and more efficient DOM manipulation. When there are lots of nodes in the DOM, updating them can be expensive in terms of processing power and resources required.

Working with the virtual DOM JavaScript object is significantly faster. Subsequently, Vue.js organizes DOM updates in batches for more efficiency.

Related questions

0 votes
asked Oct 9, 2019 in VueJS by Indian
0 votes
asked Oct 7, 2019 in VueJS by Tate
...