npm / use-debounce
use-debounce
What changed in use-debounce 4 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
10 breaking3 new APIs and options1 performance1 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inituse-debounce 104 changes
Breaking changes 2
Replaces index.modern.js; build pipelines that used the old file may need to change.
Updates the function to call immediately, so when the hook should trigger immediately after being recalled, it uses the newest function.
New APIs and options 1
Enables debouncing on the server via setTimeout when true; by default, debounced callbacks do not happen on the server.
Performance 1
Replaced useState with useReducer, which might reduce re-renders in some corner cases.
use-debounce 91 changes
Breaking changes 1
The distribution path changed from dist/index.js to dist/index.cjs, which may require updating references to the old path.
use-debounce 84 changes
Breaking changes 1
Package imports should use the root package with named exports instead of paths containing esm or lib; build outputs are now in dist.
Fixes and other changes 3
Fixed an issue with leading set to true.
Fixed behavior when a component using useDebounce or useDebounceCallback is opened in the react-devtools tab.
Fixed incorrect VSCode autocomplete.
use-debounce 71 changes
Breaking changes 1
The useDebounce hook’s isPending behavior changed from reacting asynchronously to synchronously; it now returns True as soon as the new value is sent to the hook.
use-debounce 62 changes
Breaking changes 2
Removed the callback field; useDebouncedCallback and useThrottledCallback now return callable functions directly.
useDebounce, useDebouncedCallback, and useThrottledCallback now expose an isPending method instead of pending.
use-debounce 53 changes
Breaking changes 2
Now returns an array of two fields instead of a plain array; the second field is an object with cancel, flush, and pending.
Now returns an object with callback, cancel, flush, and pending instead of an array.
New APIs and options 1
Added to both hooks to show whether the component has pending callbacks.
use-debounce 43 changes
Breaking changes 1
When the delay option is unset, it now uses requestAnimationFrame delay.
New APIs and options 1
Supports lodash-style throttling options with trailing disabled and maxWait set; the debounced function is called once when called twice within the first 300ms.
Behavior and default changes 1
The debouncedCallback returned from useDebouncedCallback now returns a value instead of undefined.