The useQueryClient hook returns the current QueryClient instance.
import { useQueryClient } from '@tanstack/react-query'
const queryClient = useQueryClient({ context })
import { useQueryClient } from '@tanstack/react-query'
const queryClient = useQueryClient({ context })
Options
“This course is the best way to learn how to use React Query in real-world applications.”—Tanner LinsleyGet the course
“This course is the best way to learn how to use React Query in real-world applications.”—Tanner LinsleyGet the course