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