UNPKG

common-hook

Version:
8 lines (7 loc) 299 B
/** * @name 支持异步函数 * @description 例如:组件加载时进行异步的检查 * @example * useAsyncEffect(async () => {setPass(await mockCheck())}, []); */ export declare const useAsyncEffect: (effect: () => AsyncGenerator<void, void, void> | Promise<void>, deps?: any) => void;