(current, workInProgress, renderLanes)
| 22072 | } |
| 22073 | |
| 22074 | function completeWork(current, workInProgress, renderLanes) { |
| 22075 | var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing |
| 22076 | // to the current tree provider fiber is just as fast and less error-prone. |
| 22077 | // Ideally we would have a special version of the work loop only |
| 22078 | // for hydration. |
| 22079 | |
| 22080 | popTreeContext(workInProgress); |
| 22081 | |
| 22082 | switch (workInProgress.tag) { |
| 22083 | case IndeterminateComponent: |
| 22084 | case LazyComponent: |
| 22085 | case SimpleMemoComponent: |
| 22086 | case FunctionComponent: |
| 22087 | case ForwardRef: |
| 22088 | case Fragment: |
| 22089 | case Mode: |
| 22090 | case Profiler: |
| 22091 | case ContextConsumer: |
| 22092 | case MemoComponent: |
| 22093 | bubbleProperties(workInProgress); |
| 22094 | return null; |
| 22095 | |
| 22096 | case ClassComponent: |
| 22097 | { |
| 22098 | var Component = workInProgress.type; |
| 22099 | |
| 22100 | if (isContextProvider(Component)) { |
| 22101 | popContext(workInProgress); |
| 22102 | } |
| 22103 | |
| 22104 | bubbleProperties(workInProgress); |
| 22105 | return null; |
| 22106 | } |
| 22107 | |
| 22108 | case HostRoot: |
| 22109 | { |
| 22110 | var fiberRoot = workInProgress.stateNode; |
| 22111 | popHostContainer(workInProgress); |
| 22112 | popTopLevelContextObject(workInProgress); |
| 22113 | resetWorkInProgressVersions(); |
| 22114 | |
| 22115 | if (fiberRoot.pendingContext) { |
| 22116 | fiberRoot.context = fiberRoot.pendingContext; |
| 22117 | fiberRoot.pendingContext = null; |
| 22118 | } |
| 22119 | |
| 22120 | if (current === null || current.child === null) { |
| 22121 | // If we hydrated, pop so that we can delete any remaining children |
| 22122 | // that weren't hydrated. |
| 22123 | var wasHydrated = popHydrationState(workInProgress); |
| 22124 | |
| 22125 | if (wasHydrated) { |
| 22126 | // If we hydrated, then we'll need to schedule an update for |
| 22127 | // the commit side-effects on the root. |
| 22128 | markUpdate(workInProgress); |
| 22129 | } else { |
| 22130 | if (current !== null) { |
| 22131 | var prevState = current.memoizedState; |
no test coverage detected
searching dependent graphs…