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 koto committed Jun 15, 2021
1 parent e13003d commit 1f3af8e
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 1f3af8e

Please sign in to comment.