Skip to content

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

@joeljeske

Description

@joeljeske

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions