pj-mill / ReactQuery

A few examples of using react query (tanstack)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReactQuery

3 apps demonstrating React Query (Tanstack) features.

Blog App

Using jsonplaceholder API, this app demonstrates ...

  1. Creating a QueryClient & QueryClientProvider
  2. Implementing useQuery while using isLoading / isFetching / isSuccess / isError & error objects
  3. Configuring 'staletime'
  4. Pagination & Prefetching
  5. Implementing useMutation for updates & deletes

Star Wars App

Using swapi API, this app demonstrates JIT fetching for infinite scrolling.

Spa Treatment

A small app for creating appointments that demonstrates ...

  1. Manually caching data with setQueryData
  2. Clearing data using removeQueries
  3. Polling using the refetchInterval option
  4. Prefetching Data
  5. Mutating data with useMutation
  6. Invalidating data with invalidateQueries
  7. useCallback, useEffect hooks
  8. Optimistic Updates

About

A few examples of using react query (tanstack)

License:MIT License


Languages

Language:TypeScript 76.8%Language:JavaScript 18.0%Language:CSS 4.1%Language:HTML 1.1%