The useQueryClient hook returns the current QueryClient instance.
1import { useQueryClient } from '@tanstack/react-query'
2
3const queryClient = useQueryClient(queryClient?: QueryClient)
Options
queryClient?: QueryClient,- Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
last updated: