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

when { enabled: false }, isFetching === true #624

Closed
wolverineks opened this issue Jun 24, 2020 · 4 comments
Closed

when { enabled: false }, isFetching === true #624

wolverineks opened this issue Jun 24, 2020 · 4 comments
Labels

Comments

@wolverineks
Copy link
Contributor

Describe the bug
when { enabled: false }, isFetching === true

To Reproduce
Steps to reproduce the behavior:
https://codesandbox.io/s/react-query-bugs-7m6j9

Expected behavior
when { enabled: false }, isFetching === false

@Haqverdi
Copy link

Haqverdi commented Jun 24, 2020

use isLoading instead

const { isLoading } = query()

Codesandbox: https://codesandbox.io/s/react-query-bugs-01luv

@wolverineks
Copy link
Contributor Author

is this intended behavior?

@tannerlinsley
Copy link
Collaborator

🎉 This issue has been resolved in version 2.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

kizivat pushed a commit to kizivat/react-query that referenced this issue Jun 25, 2020
@gornyyvladimir
Copy link
Contributor

From docs:

isFetching: boolean
Defaults to true so long as enabled is set to false

But behavior after this issue:

Defaults to false

@tannerlinsley which behavior is correct for this case? Is it a bug in docs?
https://react-query.tanstack.com/reference/useQuery

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

No branches or pull requests

4 participants