Top "React-query" questions

React-Query: How to useQuery when button is clicked

I am new to this react-query library. I know that when I want to fetch data, with this library I …

react-native react-query
No QueryClient set, use QueryClientProvider to set one

I was trying to react query for the first time then I got this at the start of my React …

javascript reactjs react-query
How to fetch n dependent data with react-query

I need help with react-query library. I fetch a list of objects and then for everyone I need to fetch …

reactjs react-hooks react-query
Handling unauthorized request in react-query

I'm having problems using react-query. Whenever the response from the server is Unauthorized, useQuery is returning flags status='success' and …

reactjs react-query
Conditionally calling an API using React-Query hook

I am using react-query to make API calls, and in this problem case I want to only call the API …

reactjs react-query
What is the main difference between React Query and Redux?

currently I am using redux in different projects for state management. A few days back, I listened about react-query which …

reactjs redux react-query
Remove query from cache without refetching react query

I am using react query in my react app this way const { data, status } = useQuery(key, queryFunc, { staleTime: 1 * 60 * 1000 }); I want …

javascript reactjs react-query
React-query: Show loading spinner while fetching data

Using react-query in new project and having small issue. Requirement is to show loading spinner on empty page before data …

javascript reactjs react-query
react-query: Refetch Query only if the state variable is changed

I have a select option menu. So, When a user selects an option, I want send a GET/ request to …

javascript reactjs caching state-management react-query
How to handle multiple queries with React-Query

I've started playing with React-Query and it works great if I only need to fetch data from a single collection …

reactjs react-query