"매 31-bit bitmask 로 매 scheduling priority 를 매 표현 — 매 concurrent React 의 매 심장.". React 18+ 의 매 Lanes 는 매 expiration time model 을 매 대체. 매 multiple priority 의 매 update 가 매 동시에 매 진행, 매 batch 가 매 lane group 단위. 매 2026 React 19 도 매 동일 model.
매 핵심
매 Bitmask 정의 (ReactFiberLane.js)
31 lanes. Bit 0 (rightmost) = 매 highest priority.
SyncLane = 0b0000000000000000000000000000001 — 매 click, input.
InputContinuousLane — 매 drag, scroll.
DefaultLane — 매 useEffect setState 등.
TransitionLanes (16 lanes) — 매 startTransition.
RetryLanes — 매 Suspense retry.
IdleLane — 매 lowest.
OffscreenLane — 매 hidden subtree.
매 Lane 연산
Merge: a | b — 매 여러 update 의 매 lane 합집합.
Subset: (a & b) === a — 매 a 가 매 b 안에.
Higher priority: 매 lower bit. getHighestPriorityLane = lanes & -lanes.
Pending: 매 fiber.lanes / fiber.childLanes — 매 자기 + 매 subtree 의 매 pending.
매 Lifecycle
setState → requestUpdateLane() → 매 lane 결정 (event type / context).
markRootUpdated(root, lane) → root.pendingLanes 에 매 OR.
ensureRootIsScheduled → 매 highest priority lane 의 매 next render schedule.
performConcurrentWorkOnRoot → 매 lane subset render. 매 yieldable.
Commit 시 매 finishedLanes 를 매 pendingLanes 에서 매 clear.
매 응용
startTransition — 매 user input 과 매 분리.
useDeferredValue — 매 stale value 표시.
Suspense retry — 매 별도 lane 으로 매 burst 방지.
💻 패턴
Lane bitmask 기본
// React internal
constSyncLane=/* */0b0000000000000000000000000000001;constInputContinuousLane=/* */0b0000000000000000000000000000100;constDefaultLane=/* */0b0000000000000000000000000010000;constTransitionLane1=/* */0b0000000000000000000000001000000;constIdleLane=/* */0b0010000000000000000000000000000;constOffscreenLane=/* */0b0100000000000000000000000000000;functiongetHighestPriorityLane(lanes){returnlanes&-lanes;// isolate lowest set bit
}functionincludesNonIdleWork(lanes){return(lanes&~IdleLanes)!==0;}
// When boundary catches → throw to nearest Suspense → schedule retry on RetryLane
// User code just renders <Suspense fallback={<Spin/>}><Lazy/></Suspense>
매 결정 기준
상황
Lane
매 click / input
SyncLane
매 scroll / drag
InputContinuousLane
매 setState in effect
DefaultLane
매 startTransition
TransitionLane
매 Suspense retry
RetryLane
매 hidden subtree pre-render
OffscreenLane
매 background prefetch
IdleLane
기본값: 매 React 가 매 자동 선택. 매 user 는 매 startTransition / useDeferredValue 만 매 명시.