The useQuery field isLoading is changing whenever I focus on window,
when i focus on window, the react query will refetch the api call, and my api return 400 with error code, this is expected behavior, but how do we prevent the isLoading from changing?
For some reason the isLoading always changing from true to false, when it is refetch when focus on window. Though the api return the same 400 value.
This is not the issue if my api return correct data .
Thanks for the help!
1 Reply
conscious-sapphire•3y ago
Hi 👋 please see: https://tanstack.com/query/v4/docs/react/guides/window-focus-refetching