mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove unnecessary case (it is handled by function code path)
This commit is contained in:
+2
-15
@@ -386,12 +386,13 @@ function updateSimpleMemoComponent(
|
||||
if (outerPropTypes) {
|
||||
checkPropTypes(
|
||||
outerPropTypes,
|
||||
nextProps, // Resolved (we know there's no defaultProps)
|
||||
nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
|
||||
'prop',
|
||||
getComponentName(outerMemoType),
|
||||
getCurrentFiberStackInDev,
|
||||
);
|
||||
}
|
||||
// Inner propTypes will be validated in the function component path.
|
||||
}
|
||||
}
|
||||
if (current !== null && updateExpirationTime < renderExpirationTime) {
|
||||
@@ -407,20 +408,6 @@ function updateSimpleMemoComponent(
|
||||
);
|
||||
}
|
||||
}
|
||||
if (__DEV__) {
|
||||
// Inner memo component props aren't currently validated in createElement.
|
||||
// We could move it there, but we'd still need this for lazy code path.
|
||||
const innerPropTypes = Component.propTypes;
|
||||
if (innerPropTypes) {
|
||||
checkPropTypes(
|
||||
innerPropTypes,
|
||||
nextProps, // Resolved props
|
||||
'prop',
|
||||
getComponentName(Component),
|
||||
getCurrentFiberStackInDev,
|
||||
);
|
||||
}
|
||||
}
|
||||
return updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
|
||||
Reference in New Issue
Block a user