(current, workInProgress)
| 9056 | } |
| 9057 | |
| 9058 | function updateFunctionalComponent(current, workInProgress) { |
| 9059 | var fn = workInProgress.type; |
| 9060 | var nextProps = workInProgress.pendingProps; |
| 9061 | |
| 9062 | if (hasLegacyContextChanged()) { |
| 9063 | // Normally we can bail out on props equality but if context has changed |
| 9064 | // we don't do the bailout and we have to reuse existing props instead. |
| 9065 | } else { |
| 9066 | if (workInProgress.memoizedProps === nextProps) { |
| 9067 | return bailoutOnAlreadyFinishedWork(current, workInProgress); |
| 9068 | } |
| 9069 | // TODO: consider bringing fn.shouldComponentUpdate() back. |
| 9070 | // It used to be here. |
| 9071 | } |
| 9072 | |
| 9073 | var unmaskedContext = getUnmaskedContext(workInProgress); |
| 9074 | var context = getMaskedContext(workInProgress, unmaskedContext); |
| 9075 | |
| 9076 | var nextChildren = void 0; |
| 9077 | |
| 9078 | { |
| 9079 | ReactCurrentOwner.current = workInProgress; |
| 9080 | ReactDebugCurrentFiber.setCurrentPhase('render'); |
| 9081 | nextChildren = fn(nextProps, context); |
| 9082 | ReactDebugCurrentFiber.setCurrentPhase(null); |
| 9083 | } |
| 9084 | // React DevTools reads this flag. |
| 9085 | workInProgress.effectTag |= PerformedWork; |
| 9086 | reconcileChildren(current, workInProgress, nextChildren); |
| 9087 | memoizeProps(workInProgress, nextProps); |
| 9088 | return workInProgress.child; |
| 9089 | } |
| 9090 | |
| 9091 | function updateClassComponent(current, workInProgress, renderExpirationTime) { |
| 9092 | // Push context providers early to prevent context stack mismatches. |
no test coverage detected