Replies: 1 comment
-
Those hooks are basically 5 lines of code without types. Either add them in your project, or you can also open a PR to add them to respective adapters. export function usePrefetchQuery<
TQueryFnData = unknown,
TError = DefaultError,
TData = TQueryFnData,
TQueryKey extends QueryKey = QueryKey,
>(options: FetchQueryOptions<TQueryFnData, TError, TData, TQueryKey>) {
const queryClient = useQueryClient()
if (!queryClient.getQueryState(options.queryKey)) {
queryClient.prefetchQuery(options)
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Actually there is
export { usePrefetchInfiniteQuery, usePrefetchQuery } from './prefetch.js';
for React, but not for Svelte and Vue.Can you add them please ? Thanks !
Beta Was this translation helpful? Give feedback.
All reactions