What is the difference between ShadowDOM and VirtualDOM?
ShadowDOM | VirtualDOM |
---|---|
Shadow DOM creates small pieces of the DOM object which has its own, isolated scope as they represent. | Virtual DOM creates a copy of the whole DOM object |
It is a tool that is used in building the apps and websites that are based on components. | It is a concept of DOM which is being used by Vue.js and React.js |
It comes in small pieces and doesn’t represent the whole Document Object Model. | It's done to improve the performance of the UI libraries |
BY Best Interview Question ON 17 Nov 2020