amis-rpc-design/node_modules/rc-tabs/es/hooks/useUpdate.d.ts

9 lines
319 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/**
* Help to merge callback with `useLayoutEffect`.
* One time will only trigger once.
*/
export default function useUpdate(callback: VoidFunction): () => void;
type Callback<T> = (ori: T) => T;
export declare function useUpdateState<T>(defaultState: T | (() => T)): [T, (updater: Callback<T>) => void];
export {};