0PricingLogin
React Academy · Lesson

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

  1. Setting Up React Query & QueryClient
  2. Caching, Stale Time & Background Refetching
  3. Mutations with useMutation
  4. Infinite Scroll & Pagination with useInfiniteQuery
← Back to React Academy