MCPcopy Create free account
hub / github.com/plotly/dash / entangleTransitions

Function entangleTransitions

dash/deps/react-dom@18.2.0.js:13538–13564  ·  view source on GitHub ↗
(root, fiber, lane)

Source from the content-addressed store, hash-verified

13536 }
13537 }
13538 function entangleTransitions(root, fiber, lane) {
13539 var updateQueue = fiber.updateQueue;
13540
13541 if (updateQueue === null) {
13542 // Only occurs if the fiber has been unmounted.
13543 return;
13544 }
13545
13546 var sharedQueue = updateQueue.shared;
13547
13548 if (isTransitionLane(lane)) {
13549 var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must
13550 // have finished. We can remove them from the shared queue, which represents
13551 // a superset of the actually pending lanes. In some cases we may entangle
13552 // more than we need to, but that's OK. In fact it's worse if we *don't*
13553 // entangle when we should.
13554
13555 queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.
13556
13557 var newQueueLanes = mergeLanes(queueLanes, lane);
13558 sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if
13559 // the lane finished since the last time we entangled it. So we need to
13560 // entangle it again, just to be sure.
13561
13562 markRootEntangled(root, newQueueLanes);
13563 }
13564 }
13565 function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
13566 // Captured updates are updates that are thrown by a child during the render
13567 // phase. They should be discarded if the render is aborted. Therefore,

Callers 2

updateContainerFunction · 0.70

Calls 4

isTransitionLaneFunction · 0.70
intersectLanesFunction · 0.70
mergeLanesFunction · 0.70
markRootEntangledFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…