You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The useDebounce hook causes inconsistent updates when value equality is customized. Specifically, the hook fails to correctly debounce values when equalityFn is provided, leading to premature or delayed state updates.
To Reproduce
Implement useDebounce with a custom equalityFn.
Change the value.
Observe that updates may either not debounce properly or trigger multiple renders.
Expected behavior
Debouncing should respect the equalityFn and delay updates consistently.
use-debounce version:
:latest
The text was updated successfully, but these errors were encountered:
Hello @Qodestackr
I'd appreciate if you share repro example, using https://codesandbox.io/ or so
It would allow me to quicker triage the problem and fix it.
Describe the bug
The
useDebounce
hook causes inconsistent updates when value equality is customized. Specifically, the hook fails to correctly debounce values whenequalityFn
is provided, leading to premature or delayed state updates.To Reproduce
Expected behavior
Debouncing should respect the equalityFn and delay updates consistently.
use-debounce version:
:latest
The text was updated successfully, but these errors were encountered: