UNPKG

simple-queries-react

Version:

Simple Queries React: Streamlined requests, powerful results. Transform your API calls into something simple, fast, and scalable with just a few lines of code.

19 lines (18 loc) 678 B
import { AnyObject, FetchHeaders, UseRequestHook } from "../@types"; export declare function useGet<T, P = AnyObject, B = AnyObject>(props?: UseRequestHook<T> | string | undefined | AnyObject): { getResponse: () => T | undefined; send: (data?: string | number | AnyObject | P | Partial<Partial<{ pathRest: AnyObject; params: P; body: B; }>> | undefined) => void; clearResponse: () => void; isLoading: () => boolean; cancelLoading: () => void; getErrors: () => any; clearErrors: () => void; setHeaders: (headers: FetchHeaders) => void; success: boolean; error: boolean; msgErrors: any; };