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

Child component stuck in loading state, but the data is already loaded. #3258

Closed
developdeez opened this issue Jul 18, 2019 · 5 comments
Closed

Comments

@developdeez
Copy link

Similar to this issue but I'm using cache-first and getting the behavior: #2899 (comment)

I'm using "apollo-client": "^2.6.2" and "react-apollo": "^2.5.6"
I noticed in my HOC when I refresh the page it will get stuck in loading...
The HOC checks if user is logged in but uses cache-first for speed.

@mikevercoelen
Copy link

Confirmed, exactly the same use case too...

@mikevercoelen
Copy link

Another thing to note is: in our use case, it seems to happen randomly that the loading never gets set to true, even tho I see the request is successfully executed.

The data object also always stays undefined

How we reproduce it is: we reload the page, and while the page is reloading -> in Chrome we open another tab, and switch back to our app, and there you go the problem happens.

I'm not sure how it works internally, but ... does it have anything to do with active tabs?

@WhoAteDaCake
Copy link

@mikevercoelen Did you ended up finding a solution?

@mikevercoelen
Copy link

mikevercoelen commented Sep 3, 2019

@WhoAteDaCake Yep upgrading to the latest apollo react hooks did it

@hwillson
Copy link
Member

hwillson commented Sep 6, 2019

This issue should be resolved in more recent versions of React Apollo. Thanks!

@hwillson hwillson closed this as completed Sep 6, 2019
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

4 participants