useDebounce
Utility
A React hook that debounces a value, delaying updates until after a specified delay to optimize performance and reduce unnecessary operations.
Installation
npm install @thibault.sh/hooksAPI Reference
Signature
function useDebounce<T>(value: T, delay: number): TParameters
| Name | Type | Description | Default |
|---|---|---|---|
value | T | The value to debounce. | - |
delay | number | The delay in milliseconds before the value updates. | - |
Returns
T
The debounced value that only updates after the delay period.