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

Function upgradePendingLanesToSync

packages/react-reconciler/src/ReactFiberLane.js:1053–1068  ·  view source on GitHub ↗
(
  root: FiberRoot,
  lanesToUpgrade: Lanes,
)

Source from the content-addressed store, hash-verified

1051}
1052
1053export function upgradePendingLanesToSync(
1054 root: FiberRoot,
1055 lanesToUpgrade: Lanes,
1056) {
1057 // Same as upgradePendingLaneToSync but accepts multiple lanes, so it's a
1058 // bit slower.
1059 root.pendingLanes |= SyncLane;
1060 root.entangledLanes |= SyncLane;
1061 let lanes = lanesToUpgrade;
1062 while (lanes) {
1063 const index = pickArbitraryLaneIndex(lanes);
1064 const lane = 1 << index;
1065 root.entanglements[SyncLaneIndex] |= lane;
1066 lanes &= ~lane;
1067 }
1068}
1069
1070export function markHiddenUpdate(
1071 root: FiberRoot,

Callers 1

flushRootFunction · 0.90

Calls 1

pickArbitraryLaneIndexFunction · 0.85

Tested by

no test coverage detected