MCPcopy
hub / github.com/facebook/react / pickArbitraryLane

Function pickArbitraryLane

packages/react-reconciler/src/ReactFiberLane.js:763–769  ·  view source on GitHub ↗
(lanes: Lanes)

Source from the content-addressed store, hash-verified

761}
762
763export function pickArbitraryLane(lanes: Lanes): Lane {
764 // This wrapper function gets inlined. Only exists so to communicate that it
765 // doesn't matter which bit is selected; you can pick any bit without
766 // affecting the algorithms where its used. Here I'm using
767 // getHighestPriorityLane because it requires the fewest operations.
768 return getHighestPriorityLane(lanes);
769}
770
771function pickArbitraryLaneIndex(lanes: Lanes) {
772 return 31 - clz32(lanes);

Callers 3

updateClassComponentFunction · 0.90
requestUpdateLaneFunction · 0.90
throwExceptionFunction · 0.90

Calls 1

getHighestPriorityLaneFunction · 0.85

Tested by

no test coverage detected