(current, workInProgress, Component, nextProps, renderLanes)
| 19593 | } |
| 19594 | |
| 19595 | function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) { |
| 19596 | { |
| 19597 | if (workInProgress.type !== workInProgress.elementType) { |
| 19598 | // Lazy component props can't be validated in createElement |
| 19599 | // because they're only guaranteed to be resolved here. |
| 19600 | var innerPropTypes = Component.propTypes; |
| 19601 | |
| 19602 | if (innerPropTypes) { |
| 19603 | checkPropTypes(innerPropTypes, nextProps, // Resolved props |
| 19604 | 'prop', getComponentNameFromType(Component)); |
| 19605 | } |
| 19606 | } |
| 19607 | } |
| 19608 | |
| 19609 | var context; |
| 19610 | |
| 19611 | { |
| 19612 | var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); |
| 19613 | context = getMaskedContext(workInProgress, unmaskedContext); |
| 19614 | } |
| 19615 | |
| 19616 | var nextChildren; |
| 19617 | var hasId; |
| 19618 | prepareToReadContext(workInProgress, renderLanes); |
| 19619 | |
| 19620 | { |
| 19621 | markComponentRenderStarted(workInProgress); |
| 19622 | } |
| 19623 | |
| 19624 | { |
| 19625 | ReactCurrentOwner$1.current = workInProgress; |
| 19626 | setIsRendering(true); |
| 19627 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); |
| 19628 | hasId = checkDidRenderIdHook(); |
| 19629 | |
| 19630 | if ( workInProgress.mode & StrictLegacyMode) { |
| 19631 | setIsStrictModeForDevtools(true); |
| 19632 | |
| 19633 | try { |
| 19634 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); |
| 19635 | hasId = checkDidRenderIdHook(); |
| 19636 | } finally { |
| 19637 | setIsStrictModeForDevtools(false); |
| 19638 | } |
| 19639 | } |
| 19640 | |
| 19641 | setIsRendering(false); |
| 19642 | } |
| 19643 | |
| 19644 | { |
| 19645 | markComponentRenderStopped(); |
| 19646 | } |
| 19647 | |
| 19648 | if (current !== null && !didReceiveUpdate) { |
| 19649 | bailoutHooks(current, workInProgress, renderLanes); |
| 19650 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); |
| 19651 | } |
| 19652 |
no test coverage detected
searching dependent graphs…