React | working of React | Question 9

Last Updated :
Discuss
Comments

What does the Virtual DOM do when a state changes?

It updates the real DOM directly

It creates a new tree and compares it to the old one

It triggers a re-render of all components

It never triggers any DOM changes

Share your thoughts in the comments