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

Function ReactFiberCompleteWork

code/redux/public/app.js:10799–11232  ·  view source on GitHub ↗
(config, hostContext, legacyContext, newContext, hydrationContext)

Source from the content-addressed store, hash-verified

10797};
10798
10799var ReactFiberCompleteWork = function (config, hostContext, legacyContext, newContext, hydrationContext) {
10800 var createInstance = config.createInstance,
10801 createTextInstance = config.createTextInstance,
10802 appendInitialChild = config.appendInitialChild,
10803 finalizeInitialChildren = config.finalizeInitialChildren,
10804 prepareUpdate = config.prepareUpdate,
10805 mutation = config.mutation,
10806 persistence = config.persistence;
10807 var getRootHostContainer = hostContext.getRootHostContainer,
10808 popHostContext = hostContext.popHostContext,
10809 getHostContext = hostContext.getHostContext,
10810 popHostContainer = hostContext.popHostContainer;
10811 var popLegacyContextProvider = legacyContext.popContextProvider,
10812 popTopLevelLegacyContextObject = legacyContext.popTopLevelContextObject;
10813 var popProvider = newContext.popProvider;
10814 var prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance,
10815 prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance,
10816 popHydrationState = hydrationContext.popHydrationState;
10817
10818
10819 function markUpdate(workInProgress) {
10820 // Tag the fiber with an update effect. This turns a Placement into
10821 // an UpdateAndPlacement.
10822 workInProgress.effectTag |= Update;
10823 }
10824
10825 function markRef(workInProgress) {
10826 workInProgress.effectTag |= Ref;
10827 }
10828
10829 function appendAllReturns(returns, workInProgress) {
10830 var node = workInProgress.stateNode;
10831 if (node) {
10832 node['return'] = workInProgress;
10833 }
10834 while (node !== null) {
10835 if (node.tag === HostComponent || node.tag === HostText || node.tag === HostPortal) {
10836 invariant(false, 'A call cannot have host component children.');
10837 } else if (node.tag === ReturnComponent) {
10838 returns.push(node.pendingProps.value);
10839 } else if (node.child !== null) {
10840 node.child['return'] = node;
10841 node = node.child;
10842 continue;
10843 }
10844 while (node.sibling === null) {
10845 if (node['return'] === null || node['return'] === workInProgress) {
10846 return;
10847 }
10848 node = node['return'];
10849 }
10850 node.sibling['return'] = node['return'];
10851 node = node.sibling;
10852 }
10853 }
10854
10855 function moveCallToHandlerPhase(current, workInProgress, renderExpirationTime) {
10856 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