| import { useQueryClient } from './QueryClientProvider' | |
| import type { DefaultError, QueryClient, QueryKey } from '@tanstack/query-core' | |
| import type { UsePrefetchQueryOptions } from './types' | |
| export function usePrefetchQuery< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| >( | |
| options: UsePrefetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>, | |
| queryClient?: QueryClient, | |
| ) { | |
| const client = useQueryClient(queryClient) | |
| if (!client.getQueryState(options.queryKey)) { | |
| client.prefetchQuery(options) | |
| } | |
| } | |
Xet Storage Details
- Size:
- 588 Bytes
- Xet hash:
- e02156997c7659a3e0c49e9727ec57689726af7990d568c813f2b4d2ca113b04
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.