Skip to content

Commit

Permalink
Remove unnecessary processUpdateQueue (facebook#21199)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sebmarkbage authored and acdlite committed Apr 13, 2021
1 parent 048ccde commit 72380bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,6 @@ function mountClassInstance(
}
}

processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;

const getDerivedStateFromProps = ctor.getDerivedStateFromProps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,6 @@ function mountClassInstance(
}
}

processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;

const getDerivedStateFromProps = ctor.getDerivedStateFromProps;
Expand Down

0 comments on commit 72380bd

Please sign in to comment.