Setting Up React Query & QueryClient
Install TanStack Query, wrap your app in QueryClientProvider, and run your first useQuery.
Welcome
In this lesson you will install TanStack Query, set up QueryClient and QueryClientProvider, and run your first useQuery to fetch data from an API.
What Is React Query?
TanStack Query (formerly React Query) manages server state: fetching, caching, synchronising, and updating data from remote sources. It replaces manual loading/error state and useEffect-based data fetching.
All lessons in this course
- Setting Up React Query & QueryClient
- Caching, Stale Time & Background Refetching
- Mutations with useMutation
- Infinite Scroll & Pagination with useInfiniteQuery