[BUG] useDebouncedCallback isPending() is true even though it was cancelled
Author: axelthatCreated Sep 19, 2024Updated Oct 6, 2025
Labelsbug
Describe the bug
debounced.isPending() is true even though debounced.cancel() was called.
To Reproduce
https://stackblitz.com/edit/vitejs-vite-9rikeg?file=src%2FApp.jsx
Type something and press enter. You should see debounced.isPending() logs true.
Expected behavior
debounced.isPending() should be false because it was canceled.
Additional context
No response
Source: juliencrn/usehooks-ts