useDebouncy
Small (180 bytes) debounce effect hook for React with TypeScript support.
Features
- ? No dependencies.
- ?️ Tiny. 180 bytes. Size Limit controls the size.
- ? Performance. Used by requestAnimationFrame.
- ? Types. Support TypeScript.
- ? Easy. Like useEffect hook.
Installation
Check bit component here
Usage
API Reference
useDebouncy
Prop | Required | Default | Description |
---|---|---|---|
fn | ✓ | Debounce callback. | |
wait | 0 |
Number of milliseconds to delay. | |
deps | [] |
Array values that the debounce depends (like as useEffect). |