UNPKG

@safe-global/safe-react-hooks

Version:

A collection of React Hooks that facilitates the interaction of React apps with Safe Smart Accounts

9 lines (8 loc) 372 B
import { DependencyList } from 'react'; /** * Hook that memoizes the result of an async function. * @param factory Async function of which the result should be memoized. * @param deps Dependency list * @returns Current result or `undefined` if not available. */ export declare function useAsyncMemo<T>(factory: () => Promise<T>, deps: DependencyList): T | undefined;