Question 8 of 10Pro Only
Explain how React's reconciliation algorithm works. What is the Virtual DOM, and how does React's diffing algorithm achieve O(n) complexity? How do keys affect this process?
Sample answer preview
## The Virtual DOM The Virtual DOM is a lightweight JavaScript representation of the actual DOM. Instead of manipulating the browser's DOM directly, React: 1. Creates a Virtual DOM tree from your components. 2. When state changes, creates a new Virtual DOM tree. 3.
Virtual DOMreconciliationdiffingkeysFiberO(n) complexity