React Query: clear data before refetch
Really simple thing, if a URL parameter changes, previous data is no longer valid and should be cleared. However, when calling refetch
from useEffect
, useQuery
doesn’t do that.
How to prevent refetch on component unmount
In my react app, I have a Chat
page. In this page, I have a query to fetch conversations.
What do these numbers represent in React Query Devtools?
I’ve been wondering what these numbers represent in React Query Devtools. I searched online, but I can’t find it’s meaning.
What does the numbers represent in the beginning of each row in React Query Devtools?
I’ve been wondering what these numbers represent in React Query Devtools. I searched online, but I can’t find it’s meaning.
React Query queryClient.setQueryData isn’t updating the cache data
I have a custom hook that looks something like this:
React Query v4 – Is it ok to call setQueryData from within onSuccess?
We have just migrated from react query v3 to react query v4. Official react query document to migrate mentions onSuccess is no longer called from setQueryData.
React Query, how to keep data cached until a valid response comes again
I’m having an issue where my app is removing OK responses from the cache and returning 404 if the backend is down.
TanStack query with react check if an object is in the cache by its id
I have a use case where I need to call a paged api like;
React Query migrating from v3 to v4
I am trying to upgrade react query from v3 to v4. While doing so I am getting some problem. Following same code in v3 and v4 gives different output
react-query: useQuery executes multiple times
I have checked other StackOverFlow questions and official react-query docs but I don’t find related info.