useAsyncCallback
Handle the execution of an async function with return data, error, and pending states.
No data.
Type Definitions
const useAsyncCallback: <T>(callback: () => Promise<T>) => {
data: T | undefined;
isPending: boolean;
error: any;
callback: () => Promise<void>;
clear: () => void;
};