useQuery isLoading state stuck on true #1732
Replies: 9 comments 12 replies
-
Hi, were you able to find a solution for this? I am also facing the same issue. |
Beta Was this translation helpful? Give feedback.
-
@TkDodo I noticed this issue is random, but what happens is the observer doesn't update the arguments after receiving the response from the API call |
Beta Was this translation helpful? Give feedback.
-
Hi, I have the same issue. I am using |
Beta Was this translation helpful? Give feedback.
-
"@tanstack/react-query": "^4.2.3" - same problem |
Beta Was this translation helpful? Give feedback.
-
"@tanstack/react-query": "^4.32.0" - same problem 😢 |
Beta Was this translation helpful? Give feedback.
-
"@tanstack/react-query": "^5.36.0" - same problem 😢 |
Beta Was this translation helpful? Give feedback.
-
I had this problem. I discovered what I think is not a good solution, but it's working. I realized that if I set a state (I called enabled), and was set to false, on useEffect I can change to true. I have forwarded this state into the enabled config of the query |
Beta Was this translation helpful? Give feedback.
-
Same problem with This is my workaround, hope it helps: Declare a
|
Beta Was this translation helpful? Give feedback.
-
Hi, So i have a useQuery hook which is configured to have a stale time of 5 minutes. Problem is if I manually navigate to the page by entering the url in the search bar, on the first attempt it shows the loading state and then the next time it displays my data. Sometimes not always on the second attempt, it could take 3-5 page refreshes before it displays the data. It is successfully making the network request and fetching the data and i can see the data in the devtools.
How can i resolve this?
Beta Was this translation helpful? Give feedback.
All reactions