(current, workInProgress, Component, nextProps, renderExpirationTime)
| 17140 | } |
| 17141 | |
| 17142 | function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) { |
| 17143 | { |
| 17144 | if (workInProgress.type !== workInProgress.elementType) { |
| 17145 | // Lazy component props can't be validated in createElement |
| 17146 | // because they're only guaranteed to be resolved here. |
| 17147 | var innerPropTypes = Component.propTypes; |
| 17148 | |
| 17149 | if (innerPropTypes) { |
| 17150 | checkPropTypes_1(innerPropTypes, nextProps, // Resolved props |
| 17151 | 'prop', getComponentName(Component), getCurrentFiberStackInDev); |
| 17152 | } |
| 17153 | } |
| 17154 | } |
| 17155 | |
| 17156 | var context; |
| 17157 | |
| 17158 | { |
| 17159 | var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); |
| 17160 | context = getMaskedContext(workInProgress, unmaskedContext); |
| 17161 | } |
| 17162 | |
| 17163 | var nextChildren; |
| 17164 | prepareToReadContext(workInProgress, renderExpirationTime); |
| 17165 | |
| 17166 | { |
| 17167 | ReactCurrentOwner$1.current = workInProgress; |
| 17168 | setIsRendering(true); |
| 17169 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime); |
| 17170 | |
| 17171 | if ( workInProgress.mode & StrictMode) { |
| 17172 | // Only double-render components with Hooks |
| 17173 | if (workInProgress.memoizedState !== null) { |
| 17174 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime); |
| 17175 | } |
| 17176 | } |
| 17177 | |
| 17178 | setIsRendering(false); |
| 17179 | } |
| 17180 | |
| 17181 | if (current !== null && !didReceiveUpdate) { |
| 17182 | bailoutHooks(current, workInProgress, renderExpirationTime); |
| 17183 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime); |
| 17184 | } // React DevTools reads this flag. |
| 17185 | |
| 17186 | |
| 17187 | workInProgress.effectTag |= PerformedWork; |
| 17188 | reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime); |
| 17189 | return workInProgress.child; |
| 17190 | } |
| 17191 | |
| 17192 | function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) { |
| 17193 | { |
no test coverage detected