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

Function ReactFiberCompleteWork

code/event-handlers/public/app.js:9878–10311  ·  view source on GitHub ↗
(config, hostContext, legacyContext, newContext, hydrationContext)

Source from the content-addressed store, hash-verified

9876};
9877
9878var ReactFiberCompleteWork = function (config, hostContext, legacyContext, newContext, hydrationContext) {
9879 var createInstance = config.createInstance,
9880 createTextInstance = config.createTextInstance,
9881 appendInitialChild = config.appendInitialChild,
9882 finalizeInitialChildren = config.finalizeInitialChildren,
9883 prepareUpdate = config.prepareUpdate,
9884 mutation = config.mutation,
9885 persistence = config.persistence;
9886 var getRootHostContainer = hostContext.getRootHostContainer,
9887 popHostContext = hostContext.popHostContext,
9888 getHostContext = hostContext.getHostContext,
9889 popHostContainer = hostContext.popHostContainer;
9890 var popLegacyContextProvider = legacyContext.popContextProvider,
9891 popTopLevelLegacyContextObject = legacyContext.popTopLevelContextObject;
9892 var popProvider = newContext.popProvider;
9893 var prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance,
9894 prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance,
9895 popHydrationState = hydrationContext.popHydrationState;
9896
9897
9898 function markUpdate(workInProgress) {
9899 // Tag the fiber with an update effect. This turns a Placement into
9900 // an UpdateAndPlacement.
9901 workInProgress.effectTag |= Update;
9902 }
9903
9904 function markRef(workInProgress) {
9905 workInProgress.effectTag |= Ref;
9906 }
9907
9908 function appendAllReturns(returns, workInProgress) {
9909 var node = workInProgress.stateNode;
9910 if (node) {
9911 node['return'] = workInProgress;
9912 }
9913 while (node !== null) {
9914 if (node.tag === HostComponent || node.tag === HostText || node.tag === HostPortal) {
9915 invariant(false, 'A call cannot have host component children.');
9916 } else if (node.tag === ReturnComponent) {
9917 returns.push(node.pendingProps.value);
9918 } else if (node.child !== null) {
9919 node.child['return'] = node;
9920 node = node.child;
9921 continue;
9922 }
9923 while (node.sibling === null) {
9924 if (node['return'] === null || node['return'] === workInProgress) {
9925 return;
9926 }
9927 node = node['return'];
9928 }
9929 node.sibling['return'] = node['return'];
9930 node = node.sibling;
9931 }
9932 }
9933
9934 function moveCallToHandlerPhase(current, workInProgress, renderExpirationTime) {
9935 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