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
This question is part of this quiz :
Working of React