mirror of
https://github.com/langgenius/dify.git
synced 2025-07-17 22:30:43 +00:00
14 lines
243 B
TypeScript
14 lines
243 B
TypeScript
![]() |
import {
|
||
|
useQueryClient,
|
||
|
} from '@tanstack/react-query'
|
||
|
|
||
|
export const useInvalid = (key: string[]) => {
|
||
|
const queryClient = useQueryClient()
|
||
|
return () => {
|
||
|
queryClient.invalidateQueries(
|
||
|
{
|
||
|
queryKey: key,
|
||
|
})
|
||
|
}
|
||
|
}
|