React10h estimated

React Fiber Architecture

Difficulty
Importance

The problem

The original reconciliation algorithm walked the virtual DOM tree recursively and couldn't be paused once started — a large update could block the main thread long enough to make typing or animation visibly stutter, with no way to interrupt the work partway through to handle something more urgent.

Why now

The virtual DOM and reconciliation already established diffing as a tree-walk, but treated that walk as an uninterruptible unit. Fiber is a rewrite of that walk into a different shape — a linked-list-like structure over the tree, from graph-theory-basics' vocabulary — specifically so the walk can be paused, resumed, and prioritized instead of running to completion in one blocking pass.

Mental model

A fiber is a unit of work corresponding to one component, linked to its parent, children, and siblings — instead of one big recursive function call stack, React can process one fiber, check if there's more urgent work waiting, and either continue or yield back to the browser, resuming exactly where it left off later. This is cooperative scheduling applied to rendering: the tree-walk becomes interruptible because it's represented as data (a linked structure to traverse manually) instead of as an implicit call stack.

Requires

Helps

Unlocks

Used in

Projects

  • Read React's source-level description of a fiber node's fields (return, child, sibling) and diagram how a small component tree maps onto that linked structure
  • Explain, in your own words, why a recursive tree walk using the call stack cannot be paused and resumed, while a manually-walked linked structure can

Examples

  • A large list re-render can be paused mid-way to handle an urgent keystroke update, then resumed from exactly the fiber it left off at, instead of blocking the keystroke until the whole list finishes
  • React abandoning a stale in-progress render when a newer update supersedes it is only possible because the work is represented as resumable/discardable fiber data, not a live call stack

Resources

Mastery checklist