Home > @lndsld/react-hooks > useThrottledCallback
Throttle callback
Reduce frequency of callback invocations
Signature:
declare function useThrottledCallback<P extends unknown[]>(callback: EventCallback<P>, timeout: number): EventCallback<P>;
Parameter | Type | Description |
---|---|---|
callback | EventCallback<P> | callback to throttle |
timeout | number | min time between callback invocations |
Returns:
throttled callback