Menu

React Rn-Rendering Wrokflow
πŸ–ΌοΈ

React Rn-Rendering Wrokflow

DEV CommunityΒ·Ankit SinghΒ·7 months ago
#Gqo0PHTx
#react#nextjs#software#coding#phase
Long article (314 words) β€” no AI summary yet.
Reading 0:00
15s threshold

In this blog I am going to share my personal analysis on React re-render workflow. In React re-rendering there are mainly 4 steps, let me tell you in very simple words what all 4 steps do:

Step 1. Trigger – basically it is when React triggers a render. There can be many ways to trigger, for example:

state change

props change

context change

parent re-render

Note : React does not immediately update DOM here, it just schedules an update.

Step 2. Render Phase – here Fiber engine comes into picture. It handles reconciliation of new changes.

Basically it:

creates new Virtual DOM

compares it with previous Virtual DOM (diffing)

decides what needs to update, delete, or create

Note : This phase is pure computation (no DOM updates)

It can be paused, restarted, or interrupted (Concurrent React)

React builds a work tree using Fiber nodes

Step 3. Commit Phase – after render phase, commit phase starts. This phase cannot be stopped.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.