-
-
Notifications
You must be signed in to change notification settings - Fork 443
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working