Virtual Dom in react

The Virtual DOM is a lightweight, in-memory representation of the real DOM. When a component's state or props change, React creates a new Virtual DOM tree and 'diffs' it with the old one (Reconciliation). It then calculates the minimum number of changes needed and applies only those to the actual DOM, making it much faster than direct DOM manipulation.