MCPcopy Index your code
hub / github.com/react/react / lanesToEventPriority

Function lanesToEventPriority

packages/react-reconciler/src/ReactEventPriorities.js:55–67  ·  view source on GitHub ↗
(lanes: Lanes)

Source from the content-addressed store, hash-verified

53}
54
55export function lanesToEventPriority(lanes: Lanes): EventPriority {
56 const lane = getHighestPriorityLane(lanes);
57 if (!isHigherEventPriority(DiscreteEventPriority, lane)) {
58 return DiscreteEventPriority;
59 }
60 if (!isHigherEventPriority(ContinuousEventPriority, lane)) {
61 return ContinuousEventPriority;
62 }
63 if (includesNonIdleWork(lane)) {
64 return DefaultEventPriority;
65 }
66 return IdleEventPriority;
67}

Callers 3

flushSpawnedWorkFunction · 0.90
flushPassiveEffectsFunction · 0.90

Calls 3

getHighestPriorityLaneFunction · 0.90
includesNonIdleWorkFunction · 0.90
isHigherEventPriorityFunction · 0.85

Tested by

no test coverage detected