What is the difference between shadow dom and virtual dom?



What is the difference between shadow dom and virtual dom?..

Answer / Arun Kumar Gaur

Shadow DOM is a web standard that allows encapsulation of HTML, CSS, and JavaScript styles within custom elements, preventing them from affecting other parts of the document. Virtual DOM, on the other hand, is a programming concept used by React and other libraries to improve performance by rendering only the changed parts of the UI when the state or props change. While Shadow DOM deals with encapsulation and isolation, Virtual DOM deals with efficiently updating the UI.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More React.js Interview Questions

How events are different in react?

1 Answers  


What is the difference between super() and super(props)?

1 Answers  


What are controlled components?

1 Answers  


Can you explain about the standard javascript toolchain, transpilation, jsx?

1 Answers  


Define the term Redux in React

1 Answers  


Explain the meaning of Mounting and Demounting

1 Answers  


Give an example of using events?

1 Answers  


What are the popular libraries used for flux?

1 Answers  


How to enable production mode in react?

1 Answers  


What is react js good for?

1 Answers  


How to update the state of the component in reactjs?

1 Answers  


What are the lifecycle methods going to be deprecated in react v16?

1 Answers  


Categories