useDebounce

This hook provides an easy way to debounce any function, ensuring that it only executes after a specified delay.

Example

Params
paramDescriptionTypeDefault
funcThe function to debounce. (...args: any)-
waitThe number of milliseconds to delay. If not provided, the function will be debounced with a default delay (usually determined by lodash)number-

API

Return
returnDescriptionTypeDefault
funcA debounced version of the provided function, which will delay its execution based on the specified wait time and options. (...args: any)-