Clear finished discrete updates during commit phase by jddxf · Pull Request #18515 · react/react (original) (raw)

@jddxf @acdlite

@acdlite

Make sure the suspended level is marked as pinged so that we return back to it later, in case the render we're about to start gets aborted. Generally we only reach this path via a ping, but we shouldn't assume that will always be the case.

@jddxf @acdlite

If a root is finished at a priority lower than that of the latest pending discrete updates on it, these updates must have been finished so we can clear them now. Otherwise, a later call of flushDiscreteUpdates would start a new empty render pass which may cause a scheduled timeout to be cancelled.

@acdlite

Happened to find this while writing a test. A JSX element comparison failed because one of them elements had a functional component as an owner, which should ever happen.

I'll add a regression test later.

acdlite added a commit to acdlite/react that referenced this pull request

Apr 8, 2020

@acdlite

Adds a regression test for the same underlying bug as react#18515 but using pings.

Test already passes, but I confirmed it fails if you revert the fix in react#18515.

acdlite added a commit that referenced this pull request

Apr 8, 2020

@acdlite

Adds a regression test for the same underlying bug as #18515 but using pings.

Test already passes, but I confirmed it fails if you revert the fix in #18515.

@jddxf jddxf deleted the lost-fallback branch

April 8, 2020 05:15

This was referenced

Sep 8, 2024

This was referenced

Sep 20, 2024

This was referenced

Oct 1, 2024

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})