@hyper-fetch/react
Version:
React hooks and utils for the hyper-fetch
11 lines • 551 B
TypeScript
import { RequestInstance } from '@hyper-fetch/core';
import { UseFetchOptionsType, UseFetchReturnType } from '.';
/**
* This hook aims to retrieve data from the server. It automatically fetches on mount and
* refetches based on dependencies, with support for caching, polling, and suspense.
* @param request Request instance
* @param options Hook options
* @returns
*/
export declare const useFetch: <R extends RequestInstance>(request: R, options?: UseFetchOptionsType<R>) => UseFetchReturnType<R>;
//# sourceMappingURL=use-fetch.hooks.d.ts.map