Skip to content

Commit

Permalink
Reset didReceiveUpdate in beginWork (#16359)
Browse files Browse the repository at this point in the history
This is a bad bug. It means that we sometimes inherit
didReceiveUpdate from a previous component's begin.

Effectively this only means that we're overrendering in some cases.

We should refactor to get rid of this as a global flag.
  • Loading branch information
sebmarkbage authored and acdlite committed Aug 12, 2019
1 parent 9449f8b commit 2716d91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/react-reconciler/src/ReactFiberBeginWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -2846,6 +2846,8 @@ function beginWork(
workInProgress,
renderExpirationTime,
);
} else {
didReceiveUpdate = false;
}
} else {
didReceiveUpdate = false;
Expand Down

0 comments on commit 2716d91

Please sign in to comment.