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

The value of data is undefined on the first render when accessing the cache #267

Closed
larsbs opened this issue Jun 6, 2019 · 1 comment
Closed
Labels
duplicate ♊ This issue has already been reported or has been described in another issue

Comments

@larsbs
Copy link

larsbs commented Jun 6, 2019

When accessing the cache (not firing a /graphql request) on the first render, the data value returned is undefined. That creates an annoying flickering effect if you have some kind of loading animation.

Sample code:
https://codesandbox.io/s/nifty-banzai-7q0bz\

You can see how switching between different components, sometimes creates a flash of the red loading background before displaying the data even tho the data is already on the cache.

@larsbs larsbs changed the title data = undefined the first render when accessing the cache The value of data is undefined on the first render when accessing the cache Jun 6, 2019
@kitten
Copy link
Member

kitten commented Jun 6, 2019

I'll go ahead and close this as per the discussion over in #245 since this is now a duplicate :)

@kitten kitten closed this as completed Jun 6, 2019
@kitten kitten added the duplicate ♊ This issue has already been reported or has been described in another issue label Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate ♊ This issue has already been reported or has been described in another issue
Projects
None yet
Development

No branches or pull requests

2 participants