UNPKG

react-simple-api

Version:

Create and cache API requests and responses

4 lines (3 loc) 322 B
import { UseApiResponse, UseApiParams } from './types'; declare const useApi: <TResponse, TData = void, TError = void>({ apiId, apiUrl, method, data, headers, cacheExpiry, retry, onSuccess, onError, pollInterval, enabled, }: UseApiParams<TResponse, TData, TError>) => UseApiResponse<TResponse, TError>; export { useApi };