UNPKG

use-minimal-fetch

Version:

A lightweight useFetch hook with Axios wrapper for React apps

11 lines (10 loc) 264 B
interface PostOptions { headers?: Record<string, string>; } export declare const usePost: <T = any, R = any>(url: string, options?: PostOptions) => { data: R | null; loading: boolean; error: any; post: (payload: T) => Promise<R>; }; export {};