react-query-kit
Version:
🕊️ A toolkit for ReactQuery that make ReactQuery hooks more reusable and typesafe
14 lines (12 loc) • 419 B
text/typescript
import { createBaseQuery } from './createBaseQuery'
import type { CompatibleError, CreateQueryOptions, QueryHook } from './types'
import { ReactQuery } from './utils'
export function createQuery<
TFnData,
TVariables = void,
TError = CompatibleError
>(
options: CreateQueryOptions<TFnData, TVariables, TError>
): QueryHook<TFnData, TVariables, TError> {
return createBaseQuery(options, ReactQuery.useQuery)
}