` useDebouncedCallback` does not have ` equalityFn` option in the type definition.
Closed this issue · 2 comments
Describe the bug
useDebouncedCallback
does not have equalityFn
option defined in the type definition.
In documentation, it says both useDebounce
and useDebouncedCallback
have equalityFn
provided.
Looking at the Type definition, and Options
does not have equalityFn
defined.
Admittedly, I haven't looked into src code to see if equalityFn
logic is actually available to useDebouncedCallback
, but if it is, then this is simply a type definition issue. From documentation, it seems like both useDebounce
and useDebouncedCallback
share options, so they should also share a type, which they currently are not.
I may come back to investigate/resolve this in a bit, but busy with some other things right now.
use-debounce version: 7.0.0
Hey @harrisonywu sorry for the long response.
equalityFn
is not presented in useDebouncedCallback, because there are no values to compare.
I'll mark that this function is a specific for the useDebounce