(current, workInProgress, Component, nextProps, renderLanes)
| 19564 | } |
| 19565 | |
| 19566 | function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) { |
| 19567 | { |
| 19568 | if (workInProgress.type !== workInProgress.elementType) { |
| 19569 | // Lazy component props can't be validated in createElement |
| 19570 | // because they're only guaranteed to be resolved here. |
| 19571 | var innerPropTypes = Component.propTypes; |
| 19572 | |
| 19573 | if (innerPropTypes) { |
| 19574 | checkPropTypes(innerPropTypes, nextProps, // Resolved props |
| 19575 | 'prop', getComponentNameFromType(Component)); |
| 19576 | } |
| 19577 | } |
| 19578 | } |
| 19579 | |
| 19580 | var context; |
| 19581 | |
| 19582 | { |
| 19583 | var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); |
| 19584 | context = getMaskedContext(workInProgress, unmaskedContext); |
| 19585 | } |
| 19586 | |
| 19587 | var nextChildren; |
| 19588 | var hasId; |
| 19589 | prepareToReadContext(workInProgress, renderLanes); |
| 19590 | |
| 19591 | { |
| 19592 | markComponentRenderStarted(workInProgress); |
| 19593 | } |
| 19594 | |
| 19595 | { |
| 19596 | ReactCurrentOwner$1.current = workInProgress; |
| 19597 | setIsRendering(true); |
| 19598 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); |
| 19599 | hasId = checkDidRenderIdHook(); |
| 19600 | |
| 19601 | if ( workInProgress.mode & StrictLegacyMode) { |
| 19602 | setIsStrictModeForDevtools(true); |
| 19603 | |
| 19604 | try { |
| 19605 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); |
| 19606 | hasId = checkDidRenderIdHook(); |
| 19607 | } finally { |
| 19608 | setIsStrictModeForDevtools(false); |
| 19609 | } |
| 19610 | } |
| 19611 | |
| 19612 | setIsRendering(false); |
| 19613 | } |
| 19614 | |
| 19615 | { |
| 19616 | markComponentRenderStopped(); |
| 19617 | } |
| 19618 | |
| 19619 | if (current !== null && !didReceiveUpdate) { |
| 19620 | bailoutHooks(current, workInProgress, renderLanes); |
| 19621 | return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); |
| 19622 | } |
| 19623 |
no test coverage detected
searching dependent graphs…