Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

useQueryClient.md

17 lines395 Bytes

The useQueryClient hook returns the current QueryClient instance.

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

const queryClient = useQueryClient(queryClient?: QueryClient)

Options

  • queryClient?: QueryClient,
    • Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.