unstale

npm / use-resize-observer

use-resize-observer

What changed in use-resize-observer 7 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-30.

15 breaking2 new APIs and options1 performance3 behavior and defaults5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

use-resize-observer 1014 changes

Breaking changes 11

  • The default export is removed; the package is named-export only.

    10.0.0release notesupgrade guide

  • Output targets ES2020, so IE11 is no longer supported.

    10.0.0release notesupgrade guide

  • The package exports map allows importing only the package root; deep imports into dist/ now fail with ERR_PACKAGE_PATH_NOT_EXPORTED.

    10.0.0upgrade guide

  • The package is dropped as a runtime dependency, leaving zero runtime dependencies.

    10.0.0release notesupgrade guide

  • A genuine zero measurement is now reported as 0; undefined means only that no measurement has been made yet.

    10.0.0upgrade guide

  • The payload now carries the raw ResizeObserverEntry, including every box size and entry.target.

    10.0.0release notesupgrade guide

  • Only the package root is importable; package subpaths are no longer available.

    10.0.0release notes

  • The /polyfilled entrypoint is removed.

    10.0.0release notesupgrade guide

  • react-dom is no longer a peer dependency.

    10.0.0release notesupgrade guide

  • The minimum supported React version is 18.2.

    10.0.0release notesupgrade guide

  • The global augmentation adding devicePixelContentBoxSize was removed; consumers need a recent TypeScript DOM lib or their own declaration.

    10.0.0upgrade guide

Behavior and default changes 1

  • Observation now works across windows and in iframes.

    10.0.0release notes

Fixes and other changes 2

  • A measured zero is reported as 0 rather than undefined.

    10.0.0release notes

  • React 19 is supported, React 18 remains supported, and the peer range is open-ended for future majors.

    10.0.0release notes

use-resize-observer 92 changes

Behavior and default changes 1

  • The library now takes Element, not only HTMLElement, to be consistent with ResizeObserver.

    9.0.0release notes

Fixes and other changes 1

use-resize-observer 84 changes

Breaking changes 1

  • Removed resize-observer-polyfill in favour of @juggle/resize-observer.

    8.0.0release notes

New APIs and options 2

Fixes and other changes 1

  • The onResize callback is no longer incorrectly called with the same values.

    8.0.0release notes

use-resize-observer 76 changes

Breaking changes 3

  • The callbackRef return value is no longer provided.

    7.0.0release notes

  • The returned ref is now a RefCallback rather than a ref object.

    7.0.0release notes

  • The hook always returns the same RefCallback, including when a custom ref object is passed.

    7.0.0release notes

Performance 1

  • A ResizeObserver instance is created only when there is an element to observe.

    7.0.0release notes

Behavior and default changes 1

  • The ref option now accepts raw elements as well as refs.

    7.0.0release notes

Fixes and other changes 1

  • Fixes an edge case where the hook tried to set state after its host component had unmounted.

    7.0.0release notes