(current, workInProgress)
| 9961 | } |
| 9962 | |
| 9963 | function updateFunctionalComponent(current, workInProgress) { |
| 9964 | var fn = workInProgress.type; |
| 9965 | var nextProps = workInProgress.pendingProps; |
| 9966 | |
| 9967 | if (hasLegacyContextChanged()) { |
| 9968 | // Normally we can bail out on props equality but if context has changed |
| 9969 | // we don't do the bailout and we have to reuse existing props instead. |
| 9970 | } else { |
| 9971 | if (workInProgress.memoizedProps === nextProps) { |
| 9972 | return bailoutOnAlreadyFinishedWork(current, workInProgress); |
| 9973 | } |
| 9974 | // TODO: consider bringing fn.shouldComponentUpdate() back. |
| 9975 | // It used to be here. |
| 9976 | } |
| 9977 | |
| 9978 | var unmaskedContext = getUnmaskedContext(workInProgress); |
| 9979 | var context = getMaskedContext(workInProgress, unmaskedContext); |
| 9980 | |
| 9981 | var nextChildren = void 0; |
| 9982 | |
| 9983 | { |
| 9984 | ReactCurrentOwner.current = workInProgress; |
| 9985 | ReactDebugCurrentFiber.setCurrentPhase('render'); |
| 9986 | nextChildren = fn(nextProps, context); |
| 9987 | ReactDebugCurrentFiber.setCurrentPhase(null); |
| 9988 | } |
| 9989 | // React DevTools reads this flag. |
| 9990 | workInProgress.effectTag |= PerformedWork; |
| 9991 | reconcileChildren(current, workInProgress, nextChildren); |
| 9992 | memoizeProps(workInProgress, nextProps); |
| 9993 | return workInProgress.child; |
| 9994 | } |
| 9995 | |
| 9996 | function updateClassComponent(current, workInProgress, renderExpirationTime) { |
| 9997 | // Push context providers early to prevent context stack mismatches. |
no test coverage detected