Skip to content

Fix nested update bug#13160

Merged
acdlite merged 1 commit intofacebook:masterfrom
acdlite:fixnestedupdatebug
Jul 6, 2018
Merged

Fix nested update bug#13160
acdlite merged 1 commit intofacebook:masterfrom
acdlite:fixnestedupdatebug

Conversation

@acdlite
Copy link
Copy Markdown
Collaborator

@acdlite acdlite commented Jul 6, 2018

A recent change to the scheduler caused a regression when scheduling many updates within a single batch. Added a test case that would have caught this.

A recent change to the scheduler caused a regression when scheduling
many updates within a single batch. Added a test case that would
have caught this.
@acdlite acdlite force-pushed the fixnestedupdatebug branch from 0244cad to 05cba71 Compare July 6, 2018 20:42
@acdlite acdlite merged commit 3596e40 into facebook:master Jul 6, 2018
@brokentone
Copy link
Copy Markdown

Was just coming to report this issue -- the issue it created for me was failures in unrelated enzyme tests when (really bad) test failures occurred. Thanks for the fixes, looking forward to the release!

@brokentone
Copy link
Copy Markdown

I would like to raise / explore one further issue though. The existence of this issue suggests that ReactDOM is somewhat stateful where at least in error cases, it has not returned to its initial state.

This is minimally problematic for tests in my situation, but I could imagine issues in SPAs where they might want to attempt to recover from a catastrophic failure.

Is there some kind of full reset? Or are these stateful moments accidental? Worth an issue / more investigation?

@gaearon
Copy link
Copy Markdown
Collaborator

gaearon commented Jul 10, 2018

This is a fix for an issue that only existed on master and not in any stable release.

@brokentone
Copy link
Copy Markdown

@gaearon The PR description of scheduler batching, yes was not released, but the nestedUpdateCount reset which was fixed on in this PR: https://github.com/facebook/react/pull/13160/files#diff-24152ba0b2ac251decb6a12f41bdf116R1478

Fixes other issues for me. In the past, anything which hit this error could never recover.

@gaearon
Copy link
Copy Markdown
Collaborator

gaearon commented Jul 11, 2018

Thanks for explaining. Let's continue in #13188.

@gaearon gaearon deleted the fixnestedupdatebug branch August 2, 2018 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants