tahamajs/IE / Projects /front /node_modules /@tanstack /react-query /src /usePrefetchInfiniteQuery.tsx
tahamajs's picture
download
raw
647 Bytes
import { useQueryClient } from './QueryClientProvider'
import type {
DefaultError,
FetchInfiniteQueryOptions,
QueryClient,
QueryKey,
} from '@tanstack/query-core'
export function usePrefetchInfiniteQuery<
TQueryFnData = unknown,
TError = DefaultError,
TData = TQueryFnData,
TQueryKey extends QueryKey = QueryKey,
TPageParam = unknown,
>(
options: FetchInfiniteQueryOptions<
TQueryFnData,
TError,
TData,
TQueryKey,
TPageParam
>,
queryClient?: QueryClient,
) {
const client = useQueryClient(queryClient)
if (!client.getQueryState(options.queryKey)) {
client.prefetchInfiniteQuery(options)
}
}

Xet Storage Details

Size:
647 Bytes
·
Xet hash:
67b1a26bd30bda83d7f6f0e2d5353a69c03af7a051114bd357798a387c431d15

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.