UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

12 lines (11 loc) 370 B
export interface UseFetchOptions extends RequestInit { autoInvoke?: boolean; } export interface UseFetchReturnValue<T> { data: T | null; loading: boolean; error: Error | null; refetch: () => Promise<any>; abort: () => void; } export declare function useFetch<T>(url: string, { autoInvoke, ...options }?: UseFetchOptions): UseFetchReturnValue<T>;