You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/service/use-base.ts

14 lines
243 B
TypeScript

import {
useQueryClient,
} from '@tanstack/react-query'
export const useInvalid = (key: string[]) => {
const queryClient = useQueryClient()
return () => {
queryClient.invalidateQueries(
{
queryKey: key,
})
}
}