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 16, 2021
1 parent b0939d7 commit 6d514b0
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 6d514b0

Please sign in to comment.