Tracks another value and gets updated in a debounced way.
Argument | Type | Description | Default value |
---|---|---|---|
value | Date | the value to be debounced | undefined |
timeout | number | milliseconds that it takes count down once | 1000 |
options.initializeWithNull | boolean | Should the debouncedValue start off as null in the first render | false |
An array is returned with the following items in it
Name | Type | Description |
---|---|---|
debouncedValue | typeof value | The debouncedValue |
immediatelyUpdateDebouncedValue | function | Handy utility function to update the debouncedValue instantly |
Join our discord server! You can click the floating discord icon at the bottom right of the screen and chat with us!