Skip to content

Commit 72380bd

Browse files
sebmarkbageacdlite
authored andcommitted
Remove unnecessary processUpdateQueue (facebook#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.
1 parent 048ccde commit 72380bd

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

packages/react-reconciler/src/ReactFiberClassComponent.new.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@ function mountClassInstance(
885885
}
886886
}
887887

888-
processUpdateQueue(workInProgress, newProps, instance, renderLanes);
889888
instance.state = workInProgress.memoizedState;
890889

891890
const getDerivedStateFromProps = ctor.getDerivedStateFromProps;

packages/react-reconciler/src/ReactFiberClassComponent.old.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@ function mountClassInstance(
885885
}
886886
}
887887

888-
processUpdateQueue(workInProgress, newProps, instance, renderLanes);
889888
instance.state = workInProgress.memoizedState;
890889

891890
const getDerivedStateFromProps = ctor.getDerivedStateFromProps;

0 commit comments

Comments
 (0)