MCPcopy Index your code
hub / github.com/microsoft/SandDance / completeWork

Function completeWork

docs/external/js/react-dom.development.js:19011–19479  ·  view source on GitHub ↗
(current, workInProgress, renderExpirationTime)

Source from the content-addressed store, hash-verified

19009 }
19010
19011 function completeWork(current, workInProgress, renderExpirationTime) {
19012 var newProps = workInProgress.pendingProps;
19013
19014 switch (workInProgress.tag) {
19015 case IndeterminateComponent:
19016 case LazyComponent:
19017 case SimpleMemoComponent:
19018 case FunctionComponent:
19019 case ForwardRef:
19020 case Fragment:
19021 case Mode:
19022 case Profiler:
19023 case ContextConsumer:
19024 case MemoComponent:
19025 return null;
19026
19027 case ClassComponent:
19028 {
19029 var Component = workInProgress.type;
19030
19031 if (isContextProvider(Component)) {
19032 popContext(workInProgress);
19033 }
19034
19035 return null;
19036 }
19037
19038 case HostRoot:
19039 {
19040 popHostContainer(workInProgress);
19041 popTopLevelContextObject(workInProgress);
19042 var fiberRoot = workInProgress.stateNode;
19043
19044 if (fiberRoot.pendingContext) {
19045 fiberRoot.context = fiberRoot.pendingContext;
19046 fiberRoot.pendingContext = null;
19047 }
19048
19049 if (current === null || current.child === null) {
19050 // If we hydrated, pop so that we can delete any remaining children
19051 // that weren't hydrated.
19052 var wasHydrated = popHydrationState(workInProgress);
19053
19054 if (wasHydrated) {
19055 // If we hydrated, then we'll need to schedule an update for
19056 // the commit side-effects on the root.
19057 markUpdate(workInProgress);
19058 }
19059 }
19060
19061 updateHostContainer(workInProgress);
19062 return null;
19063 }
19064
19065 case HostComponent:
19066 {
19067 popHostContext(workInProgress);
19068 var rootContainerInstance = getRootHostContainer();

Callers 1

completeUnitOfWorkFunction · 0.85

Calls 15

isContextProviderFunction · 0.85
popContextFunction · 0.85
popHostContainerFunction · 0.85
popTopLevelContextObjectFunction · 0.85
popHydrationStateFunction · 0.85
markUpdateFunction · 0.85
popHostContextFunction · 0.85
getRootHostContainerFunction · 0.85
markRef$1Function · 0.85
getHostContextFunction · 0.85
createInstanceFunction · 0.85

Tested by

no test coverage detected