-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
React Query V4 Alpha 19 Loading State is True when enabled false #3374
Copy link
Copy link
Closed
Description
Describe the bug
When setting the enabled flag to false in ReactQuery v4 alpha 19 the query still goes into the loading state.
Your minimal, reproducible example
https://codesandbox.io/s/intelligent-cray-4gbrg8?file=/src/index.js
Steps to reproduce
1.) Set React Query NPM version to "react-query": "v4.0.0-alpha.19"
2.) Set enabled to false on the query
3.) Observe that query goes into loading state still with enabled false.
Expected behavior
Query should not be loading or execute when enabled false.
How often does this bug happen?
100% of the time on each render.
Screenshots or Videos
N/A see Code Sandbox link for reproduction
Platform
MacOS, Windows
Chrome, Safari, & Firefox
react-query version
"react-query": "v4.0.0-alpha.19",
TypeScript version
N/a: Applies to root level JS
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels