@xrenders/xflow
Version:
一款功能强大、易用灵活的流程编辑器框架,帮助你轻松构建复杂的工作流和流程产品
12 lines (11 loc) • 516 B
TypeScript
export declare function usePrevious(value: any): any;
export declare const useSet: (initState: any) => [any, import("react").ActionDispatch<[newState: any]>];
/**
* 业务中为了防止提交按钮会被连续点击 我们会手动的设置setLoading true 和setLoading false 非常麻烦
* 所以写了这个hook 省事
* @returns
*/
type TCallback = () => Promise<any>;
type TRequestLoading = () => [boolean, (callback: TCallback) => void];
export declare const useLoadingRequest: TRequestLoading;
export {};