PromoCursed/node_modules/rc-tabs/lib/hooks/useUpdate.d.ts
2024-08-20 23:25:37 +04:00

9 lines
319 B
TypeScript

/**
* 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 {};