Skip to content

Releases: thebuilder/react-intersection-observer

v11.0.1

Choose a tag to compare

@npm-main-releasenpm-main-release released this 26 Aug 12:28

What's Changed

New Contributors

Full Changelog: v11.0.0...v11.0.1

v11.0.0

Choose a tag to compare

@thebuilderthebuilder released this 30 Jul 19:14

v11.0.0

v11 delivers a ground-up observer lifecycle rewrite, making observation and cleanup more resilient across React 17, 18, and 19. Shared callback-ref handling, idempotent cleanup, and improved threshold behavior make hooks more predictable in real-world mounting and unmounting scenarios.

It also introduces a new Blume-powered documentation site with clearer guides and examples.
Storybook and the README have been refreshed to make getting started easier.

Smaller improvements include private vulnerability reporting, stronger PR quality checks with Fallow, dependency updates, and expanded observer lifecycle tests.

What's Changed

Full Changelog: v10.1.0...v11.0.0

v10.1.0

Choose a tag to compare

@thebuilderthebuilder released this 10 Jul 13:29

What's Changed

Full Changelog: v10.0.3...v10.1.0

v10.0.3

Choose a tag to compare

@thebuilderthebuilder released this 18 Feb 14:38

What's Changed

  • prevent callback skipping with triggerOnce and merged refs by @djk01281 in #747

New Contributors

Full Changelog: v10.0.2...v10.0.3

v10.0.2

Choose a tag to compare

@thebuilderthebuilder released this 15 Jan 20:19

What's Changed

  • Add npm package size badge to README by @jantimon in #740
  • feat: bump dependencies by @thebuilder in #741
  • Fix React 17 webpack build error for useInsertionEffect by @Copilot in #744

New Contributors

Full Changelog: v10.0.0...v10.0.2

v10.0.0

Choose a tag to compare

@thebuilderthebuilder released this 28 Oct 15:02

Based on the great work in #718 by @jantimon - This release adds the new useOnInView hook.

✨ New

  • useOnInView hook — a no-re-render alternative to useInView that delivers (inView, entry) to your callback while returning a ref you can attach to any element. Designed for tracking, analytics, and other side effect heavy workloads where state updates are unnecessary.
  • IntersectionChangeEffect / IntersectionEffectOptions types — exported helper types that describe the new hook’s callback and options surface.
  • Storybook playground + documentation — new story, README section, and JSDoc example demonstrating how to use useOnInView.

⚠️ Breaking Changes

  • useInView, useOnInView, and <InView> now ignore the browser’s initial inView === false emission for onChange events, so handlers only fire once a real visibility change occurs, while still reporting all subsequent enter/leave transitions.

🧪 Testing

  • Added a dedicated Vitest suite for useOnInView, covering thresholds, triggerOnce, skip toggling, merged refs, and multiple observers on the same node.

What's Changed

  • chore: update package url in package.json by @thebuilder in #721
  • build(deps-dev): bump vite from 6.2.0 to 6.2.5 by @dependabot[bot] in #724
  • build(deps-dev): bump vite from 6.2.5 to 6.2.7 by @dependabot[bot] in #727
  • Fix minor grammatical issue in documentation intro by @Akshay-Vs in #728
  • Remove bundlephobia badge from README by @Copilot in #731
  • Update dependencies by @thebuilder in #737
  • feat: implement the useOnInView hook by @thebuilder in #738

New Contributors

  • @Akshay-Vs made their first contribution in #728
  • @Copilot made their first contribution in #731

Full Changelog: v9.16.0...v10.0.0

v9.16.0

Choose a tag to compare

@thebuilderthebuilder released this 05 Mar 20:47

What's Changed

Full Changelog: v9.15.1...v9.16.0

v9.15.1

Choose a tag to compare

@thebuilderthebuilder released this 21 Jan 11:06
27681db

9.15.1 (2025-01-21)

Bug Fixes

Fixes and improvements to react-intersection-observer/test-utils

  • always recreate the IntersectionObserver mock (c720914)
  • improve test lib detection (1858e43)
  • use isMockFunction to detect if the IntersectionObserver is being mocked (189133f)

v9.15.0

Choose a tag to compare

@thebuilderthebuilder released this 14 Jan 09:50
f098c1e

9.15.0 (2025-01-14)

Features

  • restore beforeEach in test utils (788dd47)

v9.14.1

Choose a tag to compare

@thebuilderthebuilder released this 30 Dec 21:40
f3213dd

9.14.1 (2024-12-30)

Bug Fixes

  • ensure browser environment in test-utils (6e459f2)