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

useQuery Window Focus Loop #16

Closed
johnnyflinn opened this issue Nov 6, 2019 · 1 comment
Closed

useQuery Window Focus Loop #16

johnnyflinn opened this issue Nov 6, 2019 · 1 comment

Comments

@johnnyflinn
Copy link

May be related to #8

Strange issue with what I believe has to do with window losing and then regaining focus.

Open below sandbox. "useEffect called" && "query called" should only happen once. However, if you click off the window (window loses focus) and click back on the window "query called" happens.

https://codesandbox.io/s/headless-fast-0s20z?fontsize=14

@tannerlinsley
Copy link
Collaborator

I hope this answers your question :)

https://github.com/tannerlinsley/react-query#window-focus-refetching

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

No branches or pull requests

2 participants