Concurrent Features
February 9, 20261 min readpart 06/13
React 18+ can prepare multiple UI versions simultaneously and interrupt low-priority work for urgent updates.
The Lane Model
A 31-bit bitmask where each bit is a priority level. Lanes replaced expiration times because bitmasks let React group updates (OR bits together), process subsets per render, and skip irrelevant work with a bitwise AND.
const SyncLane = 0b0000000000000000000000000000010; // Discrete events
const InputContinuousLane = 0b0000000000000000000000000001000; // Drag, scroll
const DefaultLane = 0b0000000000000000000000000100000; // Normal updates
const TransitionLane1 = 0b0000000000000000000001000000000; // startTransition
const IdleLane = 0b0100000000000000000000000000000; // LoweststartTransition
Wrapping a state update in startTransition assigns it a Transition Lane. If a high-priority update arrives (like keyboard input), React interrupts the transition, handles the urgent update, and restarts later.
Time Slicing
React's scheduler divides work into ~5ms chunks and yields back to the browser between them via MessageChannel (not requestIdleCallback, which is too unpredictable). This keeps animations smooth and inputs responsive.
Suspense
When a component throws a Promise, React catches it, renders the nearest <Suspense> fallback, attaches a .then() to the Promise, and retries when it resolves. In concurrent mode, it can keep showing old UI during transitions instead of flashing spinners.
Further reading
- React 18 Working Group Discussions (forum) Core team explanations of automatic batching, Suspense, and transitions
- What is Concurrent React? (video) Andrew Clark at React Conf 2021 on the concurrent model
- How Does useTransition Work? (deep dive) jser.dev traces startTransition through lane assignment and interruption
- How Does the React Scheduler Work? (deep dive) jser.dev on the priority queue, 5ms time slices, and MessageChannel
- ReactFiberLane.js (source) The full lane model: bitmask definitions, merging, subset checks
- How Does Suspense Work Internally? (deep dive) Promise throwing, fallback rendering, ping mechanism, and retries