(current, workInProgress, renderLanes)
| 22111 | } |
| 22112 | |
| 22113 | function completeWork(current, workInProgress, renderLanes) { |
| 22114 | var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing |
| 22115 | // to the current tree provider fiber is just as fast and less error-prone. |
| 22116 | // Ideally we would have a special version of the work loop only |
| 22117 | // for hydration. |
| 22118 | |
| 22119 | popTreeContext(workInProgress); |
| 22120 | |
| 22121 | switch (workInProgress.tag) { |
| 22122 | case IndeterminateComponent: |
| 22123 | case LazyComponent: |
| 22124 | case SimpleMemoComponent: |
| 22125 | case FunctionComponent: |
| 22126 | case ForwardRef: |
| 22127 | case Fragment: |
| 22128 | case Mode: |
| 22129 | case Profiler: |
| 22130 | case ContextConsumer: |
| 22131 | case MemoComponent: |
| 22132 | bubbleProperties(workInProgress); |
| 22133 | return null; |
| 22134 | |
| 22135 | case ClassComponent: |
| 22136 | { |
| 22137 | var Component = workInProgress.type; |
| 22138 | |
| 22139 | if (isContextProvider(Component)) { |
| 22140 | popContext(workInProgress); |
| 22141 | } |
| 22142 | |
| 22143 | bubbleProperties(workInProgress); |
| 22144 | return null; |
| 22145 | } |
| 22146 | |
| 22147 | case HostRoot: |
| 22148 | { |
| 22149 | var fiberRoot = workInProgress.stateNode; |
| 22150 | popHostContainer(workInProgress); |
| 22151 | popTopLevelContextObject(workInProgress); |
| 22152 | resetWorkInProgressVersions(); |
| 22153 | |
| 22154 | if (fiberRoot.pendingContext) { |
| 22155 | fiberRoot.context = fiberRoot.pendingContext; |
| 22156 | fiberRoot.pendingContext = null; |
| 22157 | } |
| 22158 | |
| 22159 | if (current === null || current.child === null) { |
| 22160 | // If we hydrated, pop so that we can delete any remaining children |
| 22161 | // that weren't hydrated. |
| 22162 | var wasHydrated = popHydrationState(workInProgress); |
| 22163 | |
| 22164 | if (wasHydrated) { |
| 22165 | // If we hydrated, then we'll need to schedule an update for |
| 22166 | // the commit side-effects on the root. |
| 22167 | markUpdate(workInProgress); |
| 22168 | } else { |
| 22169 | if (current !== null) { |
| 22170 | var prevState = current.memoizedState; |
no test coverage detected
searching dependent graphs…