# What changed in use-debounce

> 18 changes in use-debounce 4 to 10 from its official release notes, upgrade guides and advisories: 10 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-26. HTML: https://unstale.sh/npm/use-debounce/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## use-debounce 10

### Breaking changes

- Replaces index.modern.js; build pipelines that used the old file may need to change. (10.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/10.0.0)
- Updates the function to call immediately, so when the hook should trigger immediately after being recalled, it uses the newest function. (10.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/10.0.0)

### New APIs and options

- Enables debouncing on the server via setTimeout when true; by default, debounced callbacks do not happen on the server. (10.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/10.0.0)

### Performance

- Replaced useState with useReducer, which might reduce re-renders in some corner cases. (10.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/10.0.0)

## use-debounce 9

### Breaking changes

- The distribution path changed from dist/index.js to dist/index.cjs, which may require updating references to the old path. (9.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/9.0.0)

## use-debounce 8

### Breaking changes

- Package imports should use the root package with named exports instead of paths containing esm or lib; build outputs are now in dist. (8.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/8.0.0)

### Fixes and other changes

- Fixed an issue with leading set to true. (8.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/8.0.0)
- Fixed behavior when a component using useDebounce or useDebounceCallback is opened in the react-devtools tab. (8.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/8.0.0)
- Fixed incorrect VSCode autocomplete. (8.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/8.0.0)

## use-debounce 7

### Breaking changes

- 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. (7.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/7.0.0)

## use-debounce 6

### Breaking changes

- Removed the callback field; useDebouncedCallback and useThrottledCallback now return callable functions directly. (6.0.0) — [release notes](https://github.com/xnimorz/use-debounce/blob/HEAD/CHANGELOG.md)
- useDebounce, useDebouncedCallback, and useThrottledCallback now expose an isPending method instead of pending. (6.0.0) — [release notes](https://github.com/xnimorz/use-debounce/blob/HEAD/CHANGELOG.md)

## use-debounce 5

### Breaking changes

- Now returns an array of two fields instead of a plain array; the second field is an object with cancel, flush, and pending. (5.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/5.0.0)
- Now returns an object with callback, cancel, flush, and pending instead of an array. (5.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/5.0.0)

### New APIs and options

- Added to both hooks to show whether the component has pending callbacks. (5.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/5.0.0)

## use-debounce 4

### Breaking changes

- When the delay option is unset, it now uses requestAnimationFrame delay. (4.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/4.0.0)

### New APIs and options

- Supports lodash-style throttling options with trailing disabled and maxWait set; the debounced function is called once when called twice within the first 300ms. (4.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/4.0.0)

### Behavior and default changes

- The debouncedCallback returned from useDebouncedCallback now returns a value instead of undefined. (4.0.0) — [release notes](https://github.com/xnimorz/use-debounce/releases/tag/4.0.0)
