Skip to content
Discussion options

You must be logged in to vote

When setState is called, React creates an update object and places it in the component’s update queue. The scheduler assigns a priority to the update and marks the affected Fiber subtree as dirty. React then enters the render (reconciliation) phase, building a work-in-progress Fiber tree by running beginWork and completeWork on each Fiber. This phase is interruptible. React collects all necessary DOM changes in an effect list. When the render phase completes, React enters the synchronous commit phase, applies DOM mutations, runs layout effects, triggers the browser paint, and finally runs passive effects. At the end, React swaps the new Fiber tree into place, and the UI is updated.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yamaha49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants