mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove hidden functional shouldComponentUpdate API (#10371)
This commit is contained in:
@@ -198,16 +198,8 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
|
||||
if (nextProps === null || memoizedProps === nextProps) {
|
||||
return bailoutOnAlreadyFinishedWork(current, workInProgress);
|
||||
}
|
||||
// TODO: Disable this before release, since it is not part of the public API
|
||||
// I use this for testing to compare the relative overhead of classes.
|
||||
if (
|
||||
typeof fn.shouldComponentUpdate === 'function' &&
|
||||
!fn.shouldComponentUpdate(memoizedProps, nextProps)
|
||||
) {
|
||||
// Memoize props even if shouldComponentUpdate returns false
|
||||
memoizeProps(workInProgress, nextProps);
|
||||
return bailoutOnAlreadyFinishedWork(current, workInProgress);
|
||||
}
|
||||
// TODO: consider bringing fn.shouldComponentUpdate() back.
|
||||
// It used to be here.
|
||||
}
|
||||
|
||||
var unmaskedContext = getUnmaskedContext(workInProgress);
|
||||
|
||||
Reference in New Issue
Block a user