Skip to content
This repository has been 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

Closed
optunetobi opened this issue Dec 17, 2018 · 1 comment

Comments

@optunetobi
Copy link

optunetobi commented Dec 17, 2018

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

@hwillson
Copy link
Member

This should no longer be an issue. Please try out a current day version of react-apollo, and keep us posted. Thanks!

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

No branches or pull requests

2 participants