# What changed in use-resize-observer

> 26 changes in use-resize-observer 7 to 10 from its official release notes, upgrade guides and advisories: 15 breaking, 2 new APIs and options. Each one cited. Sources checked 2026-10-30. HTML: https://unstale.sh/npm/use-resize-observer/

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

## use-resize-observer 10

### Breaking changes

- The default export is removed; the package is named-export only. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- Output targets ES2020, so IE11 is no longer supported. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- The package exports map allows importing only the package root; deep imports into dist/ now fail with ERR_PACKAGE_PATH_NOT_EXPORTED. (10.0.0) — [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- The package is dropped as a runtime dependency, leaving zero runtime dependencies. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- A genuine zero measurement is now reported as 0; undefined means only that no measurement has been made yet. (10.0.0) — [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- The payload now carries the raw ResizeObserverEntry, including every box size and entry.target. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- Only the package root is importable; package subpaths are no longer available. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0)
- The /polyfilled entrypoint is removed. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- react-dom is no longer a peer dependency. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- The minimum supported React version is 18.2. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0), [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)
- The global augmentation adding devicePixelContentBoxSize was removed; consumers need a recent TypeScript DOM lib or their own declaration. (10.0.0) — [upgrade guide](https://github.com/ZeeCoder/use-resize-observer/blob/HEAD/MIGRATION.md)

### Behavior and default changes

- Observation now works across windows and in iframes. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0)

### Fixes and other changes

- A measured zero is reported as 0 rather than undefined. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0)
- React 19 is supported, React 18 remains supported, and the peer range is open-ended for future majors. (10.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v10.0.0)

## use-resize-observer 9

### Behavior and default changes

- The library now takes Element, not only HTMLElement, to be consistent with ResizeObserver. (9.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v9.0.0)

### Fixes and other changes

- Fixes were added for React 18. (9.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v9.0.0)

## use-resize-observer 8

### Breaking changes

- Removed resize-observer-polyfill in favour of @juggle/resize-observer. (8.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v8.0.0)

### New APIs and options

- Added the box option. (8.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v8.0.0)
- Added the round option. (8.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v8.0.0)

### Fixes and other changes

- The onResize callback is no longer incorrectly called with the same values. (8.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v8.0.0)

## use-resize-observer 7

### Breaking changes

- The callbackRef return value is no longer provided. (7.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v7.0.0)
- The returned ref is now a RefCallback rather than a ref object. (7.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v7.0.0)
- The hook always returns the same RefCallback, including when a custom ref object is passed. (7.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v7.0.0)

### Performance

- A ResizeObserver instance is created only when there is an element to observe. (7.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v7.0.0)

### Behavior and default changes

- The ref option now accepts raw elements as well as refs. (7.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v7.0.0)

### Fixes and other changes

- Fixes an edge case where the hook tried to set state after its host component had unmounted. (7.0.0) — [release notes](https://github.com/ZeeCoder/use-resize-observer/releases/tag/v7.0.0)
