Skip to content

Files

Latest commit

 

History

History
17 lines (12 loc) · 395 Bytes

useQueryClient.md

File metadata and controls

17 lines (12 loc) · 395 Bytes
id title
useQueryClient
useQueryClient

The useQueryClient hook returns the current QueryClient instance.

import { useQueryClient } from '@tanstack/react-query'

const queryClient = useQueryClient({ context })

Options

  • context?: React.Context<QueryClient | undefined>
    • Use this to use a custom React Query context. Otherwise, defaultContext will be used.