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:

  1. Component state change
  2. Creating a new Virtual DOM tree
  3. Comparing with the previous Virtual DOM (diffing)
  4. Updating only the changed parts of the real DOM