[BUG] useDebounceValue - `delay` parameter should be optional
Author: molokoCreated Jun 11, 2025Updated Jul 12, 2025
Labelsbug
Describe the bug
The documentation for useDebounceValue states that 'default is 500ms' which implies that this parameter should be optional - like it is for useDebounceCallback - but it's not...
To Reproduce
Try using useDebounceValue in a TypeScript project, without passing a delay parameter. Observe that TypeScript throws an error saying 'Expected 2-3 arguments, but got 1.'
Expected behavior
You should be able to omit the delay parameter to have it default to 500ms, just like you can with useDebounceCallback
Additional context
https://usehooks-ts.com/react-hook/use-debounce-callback#api
Source: juliencrn/usehooks-ts