The useQueryClient hook returns the current QueryClient instance.
import { useQueryClient } from '@tanstack/react-query' const queryClient = useQueryClient({ context })
Options
“If you’re serious about *really* understanding React Query, there’s no better way than with query.gg”—Tanner Linsley