Understanding React Fiber - Trees, Diff, and Commit Phases
Introduction
React Fiber is the core of modern React rendering, enabling incremental rendering, time slicing, and high-performance updates. In this blog, we will explore:
- Fiber nodes and structure
- Fiber loop and traversal
- Diff/reconciliation algorithm
- Work-in-progress (WIP) tree
- Current fiber tree vs real DOM
- Commit phase and tree flow
1. What is a Fiber Node?
A Fiber node is a unit of work in React’s incremental rendering. It contains:
type→ element type (div,span, Component)key→ unique identifier for list reconciliationprops→ element propertiesstateNode→ reference to actual DOM node or component instancechild,sibling,return→ pointers for tree traversalalternate→ link to the previous fiber (used for diffing)effectTag→ indicates updates needed (Placement,Update,Deletion)
Example fiber node:


