Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Upgrading from 2.2.4 to 2.3.3 breaks React-rendered content in <Query /> with fetchPolicy="network-only" #2670

@optunetobi

Description

@optunetobi

Upgrading from 2.2.4 to 2.3.3 breaks React-rendered content in <Query /> with fetchPolicy="network-only"

Intended outcome:

Query with fetchPolicy="network-only" will display Component after fetching data over the network.

Actual outcome:

React renders the Loading component instead of the intended Component and gives the following warning in console:

Warning: render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.

How to reproduce the issue:

<Query key={'mykey'} query={QUERY} fetchPolicy="network-only">
          {({ loading, error, data, client }) =>
            loading ? (
              <div>Loading data...</div>
            ) : error ? (
              <div>Error...</div>
            ) : (
              <Component data={data} />
            )
          }
</Query>

It might be due to this Change: #2493

Version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions