Skip to content

Commit

Permalink
Remove unnecessary processUpdateQueue (#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 committed Apr 8, 2021
1 parent cf45a62 commit c486dc1
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 c486dc1

Please sign in to comment.