Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Render after suspense is thrown away leaving DOM unmatched with state #18844

Closed
joeljeske opened this issue May 6, 2020 · 2 comments · Fixed by #19216
Closed

Bug: Render after suspense is thrown away leaving DOM unmatched with state #18844

joeljeske opened this issue May 6, 2020 · 2 comments · Fixed by #19216

Comments

@joeljeske
Copy link

React version: 16.12.0

Steps To Reproduce

A component that suspends as a result of a context update is never rendered to DOM after suspension is finished.

Link to code example:

https://codesandbox.io/s/react-suspense-context-bug-rklls?file=/package.json:163-170

The current behavior

If a component suspends as a result of a context update, the component's render is called after suspension is finished but the result of the render is not reflected in the DOM (and effects aren't called).

The expected behavior

If a component suspends as a result of a context update, the component's render should be called and flushed to the DOM and effects called.

Related Issues:

#17356 - seems related to memoization but this does not use any memoization

@joeljeske joeljeske added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label May 6, 2020
@chriserickson-cb
Copy link

We ran into this same problem, the codesandbox seems like a pretty good reproduction case.

We're on React 16.9 / React Native 0.61.5.

@gaearon gaearon added Component: Reconciler Component: Suspense Type: Bug and removed Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Jun 29, 2020
@gaearon
Copy link
Collaborator

gaearon commented Jun 29, 2020

I think this is a duplicate of #17356.

seems related to memoization but this does not use any memoization

It does use memoization in the sense that children is always going to be the same element since it's passed from above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants