Click in order · JavaScript and React course · Module 1: React Basics
Sorting: Virtual DOM flow
Arrange the Virtual DOM process in order:
Items to click
- Comparing with the previous Virtual DOM (diffing)
- Updating only the changed parts of the real DOM
- Component state change
- Creating a new Virtual DOM tree
Show the answer
Correct order:
- Component state change
- Creating a new Virtual DOM tree
- Comparing with the previous Virtual DOM (diffing)
- Updating only the changed parts of the real DOM