UNPKG

@thisisagile/easy-react

Version:

Straightforward library building micro applications in react

7 lines (6 loc) 221 B
import { DependencyList } from 'react'; export type UseOnceOptions<E> = { deps?: DependencyList; initial?: Partial<E>; }; export declare function useOnce<E>(f: () => Promise<E>, options?: UseOnceOptions<E>): [E];