Remove unnecessary processUpdateQueue (#21199)
We've just initialized the update queue above this and there's no user code that executes between. The general API that prevents this from mattering is that you can't call setState in the constructor.
Sebastian Markbåge committed
Apr 8, 2021 at 14:14 UTC
c486dc1a46c47ad276140a51b1155eb1f8900dd8
2 files changed
-2
packages/react-reconciler/src/ReactFiberClassComponent.new.js
-1
@@ -885,7 +885,6 @@ function mountClassInstance(
885
}
886
}
887
888
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
888
instance.state = workInProgress.memoizedState;
889
890
const getDerivedStateFromProps = ctor.getDerivedStateFromProps;
packages/react-reconciler/src/ReactFiberClassComponent.old.js
-1
@@ -885,7 +885,6 @@ function mountClassInstance(
885
}
886
}
887
888
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
888
instance.state = workInProgress.memoizedState;
889
890
const getDerivedStateFromProps = ctor.getDerivedStateFromProps;