npm / react-intersection-observer
react-intersection-observer
What changed in react-intersection-observer 9 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
2 breaking4 new APIs and options7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-intersection-observer 114 changes
Fixes and other changes 4
InView resumes observation when triggerOnce is disabled.
Callback ref cleanup compatibility is improved across React 17, 18, and 19.
Observation cleanup is now idempotent, making cleanup more resilient.
Thresholds are respected before trigger-once cleanup.
react-intersection-observer 107 changes
Breaking changes 1
Ignores the browser’s initial
inView === falseemission foronChange; handlers fire only after a real visibility change, while subsequent transitions are still reported.
New APIs and options 4
Adds support for the scrollMargin option for intersection observers.
Adds an exported helper type describing the new hook’s callback surface.
Adds an exported helper type describing the new hook’s options surface.
Adds a no-re-render hook that calls a callback with (inView, entry) and returns a ref, for tracking and other side-effect-heavy workloads.
Fixes and other changes 2
Prevents callbacks from being skipped when triggerOnce is used with merged refs.
Fixes a React 17 webpack build error for useInsertionEffect.
react-intersection-observer 92 changes
Breaking changes 1
Removed the default export; import the component using the named InView import instead.
Fixes and other changes 1
Fixed exports not being properly tree-shaken, reducing the bundle size impact of imported exports.