Skip to content

Reset stateNode in resetWorkInProgress#18448

Merged
sebmarkbage merged 2 commits into
react:masterfrom
sebmarkbage:suspenselistclassfix
Apr 1, 2020
Merged

Reset stateNode in resetWorkInProgress#18448
sebmarkbage merged 2 commits into
react:masterfrom
sebmarkbage:suspenselistclassfix

Conversation

@sebmarkbage

Copy link
Copy Markdown
Contributor

Alternative fix to #18432

resetWorkInProgress is supposed to put the Fiber into the same state as if it was just created by child fiber reconciliation. For newly created fibers, that means that stateNode is null.

eps1lon and others added 2 commits March 31, 2020 13:39
This is supposed to put the Fiber into the same state as if it was just
created by child fiber reconciliation. For newly created fibers, that means
that stateNode is null.
@sebmarkbage sebmarkbage requested review from acdlite and gaearon March 31, 2020 20:41
@facebook-github-bot facebook-github-bot added React Core Team Opened by a member of the React Core Team CLA Signed labels Mar 31, 2020
@sizebot

sizebot commented Mar 31, 2020

Copy link
Copy Markdown

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 4089176

@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4089176:

Sandbox Source
nervous-johnson-r1mkq Configuration

@sizebot

sizebot commented Mar 31, 2020

Copy link
Copy Markdown

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 4089176

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that this closes #18429

@gaearon

gaearon commented Mar 31, 2020

Copy link
Copy Markdown
Collaborator

Why does resuming code path still exist?

@sebmarkbage

Copy link
Copy Markdown
Contributor Author

Not sure. Maybe legacy mode suspense?

@sebmarkbage sebmarkbage merged commit 0f33455 into react:master Apr 1, 2020
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
* test(SuspenseList): Add failing test for class component

* Reset stateNode when resetWorkInProgress

This is supposed to put the Fiber into the same state as if it was just
created by child fiber reconciliation. For newly created fibers, that means
that stateNode is null.

Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants