@byndyusoft-ui/use-throttled-callback
Version:
Byndyusoft UI React Hook
7 lines (6 loc) • 317 B
TypeScript
export interface IThrottledCallbackOptions {
leading?: boolean;
trailing?: boolean;
}
declare function useThrottledCallback<A extends unknown[]>(callback: (...args: A) => void, delay: number, { leading, trailing }?: IThrottledCallbackOptions): (...args: A) => void;
export default useThrottledCallback;