MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / ReactFiberCompleteWork

Function ReactFiberCompleteWork

code/communication/public/app.js:10583–11016  ·  view source on GitHub ↗
(config, hostContext, legacyContext, newContext, hydrationContext)

Source from the content-addressed store, hash-verified

10581};
10582
10583var ReactFiberCompleteWork = function (config, hostContext, legacyContext, newContext, hydrationContext) {
10584 var createInstance = config.createInstance,
10585 createTextInstance = config.createTextInstance,
10586 appendInitialChild = config.appendInitialChild,
10587 finalizeInitialChildren = config.finalizeInitialChildren,
10588 prepareUpdate = config.prepareUpdate,
10589 mutation = config.mutation,
10590 persistence = config.persistence;
10591 var getRootHostContainer = hostContext.getRootHostContainer,
10592 popHostContext = hostContext.popHostContext,
10593 getHostContext = hostContext.getHostContext,
10594 popHostContainer = hostContext.popHostContainer;
10595 var popLegacyContextProvider = legacyContext.popContextProvider,
10596 popTopLevelLegacyContextObject = legacyContext.popTopLevelContextObject;
10597 var popProvider = newContext.popProvider;
10598 var prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance,
10599 prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance,
10600 popHydrationState = hydrationContext.popHydrationState;
10601
10602
10603 function markUpdate(workInProgress) {
10604 // Tag the fiber with an update effect. This turns a Placement into
10605 // an UpdateAndPlacement.
10606 workInProgress.effectTag |= Update;
10607 }
10608
10609 function markRef(workInProgress) {
10610 workInProgress.effectTag |= Ref;
10611 }
10612
10613 function appendAllReturns(returns, workInProgress) {
10614 var node = workInProgress.stateNode;
10615 if (node) {
10616 node['return'] = workInProgress;
10617 }
10618 while (node !== null) {
10619 if (node.tag === HostComponent || node.tag === HostText || node.tag === HostPortal) {
10620 invariant(false, 'A call cannot have host component children.');
10621 } else if (node.tag === ReturnComponent) {
10622 returns.push(node.pendingProps.value);
10623 } else if (node.child !== null) {
10624 node.child['return'] = node;
10625 node = node.child;
10626 continue;
10627 }
10628 while (node.sibling === null) {
10629 if (node['return'] === null || node['return'] === workInProgress) {
10630 return;
10631 }
10632 node = node['return'];
10633 }
10634 node.sibling['return'] = node['return'];
10635 node = node.sibling;
10636 }
10637 }
10638
10639 function moveCallToHandlerPhase(current, workInProgress, renderExpirationTime) {
10640 var props = workInProgress.memoizedProps;

Callers 1

ReactFiberSchedulerFunction · 0.70

Calls 6

markUpdateFunction · 0.70
invariantFunction · 0.70
appendAllChildrenFunction · 0.70
getRootHostContainerFunction · 0.70
getHostContextFunction · 0.70

Tested by

no test coverage detected