MCPcopy Index your code
hub / github.com/plotly/dash / markUpdateLaneFromFiberToRoot

Function markUpdateLaneFromFiberToRoot

dash/deps/react-dom@18.2.0.js:13395–13438  ·  view source on GitHub ↗
(sourceFiber, lane)

Source from the content-addressed store, hash-verified

13393 var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
13394
13395 function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
13396 // Update the source fiber's lanes
13397 sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
13398 var alternate = sourceFiber.alternate;
13399
13400 if (alternate !== null) {
13401 alternate.lanes = mergeLanes(alternate.lanes, lane);
13402 }
13403
13404 {
13405 if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
13406 warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
13407 }
13408 } // Walk the parent path to the root and update the child lanes.
13409
13410
13411 var node = sourceFiber;
13412 var parent = sourceFiber.return;
13413
13414 while (parent !== null) {
13415 parent.childLanes = mergeLanes(parent.childLanes, lane);
13416 alternate = parent.alternate;
13417
13418 if (alternate !== null) {
13419 alternate.childLanes = mergeLanes(alternate.childLanes, lane);
13420 } else {
13421 {
13422 if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
13423 warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
13424 }
13425 }
13426 }
13427
13428 node = parent;
13429 parent = parent.return;
13430 }
13431
13432 if (node.tag === HostRoot) {
13433 var root = node.stateNode;
13434 return root;
13435 } else {
13436 return null;
13437 }
13438 }
13439
13440 var UpdateState = 0;
13441 var ReplaceState = 1;

Callers 3

Calls 2

mergeLanesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…