GitPedia
thebuilder

thebuilder/react-intersection-observer

React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport.

30 Releases
Latest: 4mo ago
v10.0.3Latest
thebuilderthebuilder·4mo ago·February 18, 2026
GitHub

📋 What's Changed

  • prevent callback skipping with triggerOnce and merged refs by @djk01281 in https://github.com/thebuilder/react-intersection-observer/pull/747

New Contributors

  • @djk01281 made their first contribution in https://github.com/thebuilder/react-intersection-observer/pull/747
  • Full Changelog: https://github.com/thebuilder/react-intersection-observer/compare/v10.0.2...v10.0.3
v10.0.2
thebuilderthebuilder·5mo ago·January 15, 2026
GitHub

📋 What's Changed

  • Add npm package size badge to README by @jantimon in https://github.com/thebuilder/react-intersection-observer/pull/740
  • feat: bump dependencies by @thebuilder in https://github.com/thebuilder/react-intersection-observer/pull/741
  • Fix React 17 webpack build error for useInsertionEffect by @Copilot in https://github.com/thebuilder/react-intersection-observer/pull/744

New Contributors

  • @jantimon made their first contribution in https://github.com/thebuilder/react-intersection-observer/pull/740
  • Full Changelog: https://github.com/thebuilder/react-intersection-observer/compare/v10.0.0...v10.0.2
v10.0.0
thebuilderthebuilder·8mo ago·October 28, 2025
GitHub

✨ 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 https://github.com/thebuilder/react-intersection-observer/pull/721
  • build(deps-dev): bump vite from 6.2.0 to 6.2.5 by @dependabot[bot] in https://github.com/thebuilder/react-intersection-observer/pull/724
  • build(deps-dev): bump vite from 6.2.5 to 6.2.7 by @dependabot[bot] in https://github.com/thebuilder/react-intersection-observer/pull/727
  • Fix minor grammatical issue in documentation intro by @Akshay-Vs in https://github.com/thebuilder/react-intersection-observer/pull/728
  • Remove bundlephobia badge from README by @Copilot in https://github.com/thebuilder/react-intersection-observer/pull/731
  • Update dependencies by @thebuilder in https://github.com/thebuilder/react-intersection-observer/pull/737
  • feat: implement the useOnInView hook by @thebuilder in https://github.com/thebuilder/react-intersection-observer/pull/738

New Contributors

  • @Akshay-Vs made their first contribution in https://github.com/thebuilder/react-intersection-observer/pull/728
  • @Copilot made their first contribution in https://github.com/thebuilder/react-intersection-observer/pull/731
  • Full Changelog: https://github.com/thebuilder/react-intersection-observer/compare/v9.16.0...v10.0.0
v9.16.0
thebuilderthebuilder·1y ago·March 5, 2025
GitHub

📋 What's Changed

  • ci: drop semantic release flow by @thebuilder in https://github.com/thebuilder/react-intersection-observer/pull/719
  • Correctly detect global testing framework by @thebuilder in https://github.com/thebuilder/react-intersection-observer/pull/720
  • Full Changelog: https://github.com/thebuilder/react-intersection-observer/compare/v9.15.1...v9.16.0
v9.15.1
thebuilderthebuilder·1y ago·January 21, 2025
GitHub

🐛 Bug Fixes

  • Fixes and improvements to `react-intersection-observer/test-utils`
  • always recreate the IntersectionObserver mock ([c720914](https://github.com/thebuilder/react-intersection-observer/commit/c720914d8c3eccf359182534a0b4fe7247121f20))
  • improve test lib detection ([1858e43](https://github.com/thebuilder/react-intersection-observer/commit/1858e4305fb823e021afa0a4bcb9c7a4f6839410))
  • use `isMockFunction` to detect if the IntersectionObserver is being mocked ([189133f](https://github.com/thebuilder/react-intersection-observer/commit/189133f3ad646ddb8d86d11024e8560f884f5c21))
v9.15.0
thebuilderthebuilder·1y ago·January 14, 2025
GitHub

Features

  • restore beforeEach in test utils ([788dd47](https://github.com/thebuilder/react-intersection-observer/commit/788dd47f0009532d3cf0078acb5b6a1085631ed2))
v9.14.1
thebuilderthebuilder·1y ago·December 30, 2024
GitHub

🐛 Bug Fixes

  • ensure browser environment in test-utils ([6e459f2](https://github.com/thebuilder/react-intersection-observer/commit/6e459f292fed2dd1cac976c47ccb0573ae57d038))
v9.14.0
thebuilderthebuilder·1y ago·December 14, 2024
GitHub

Features

  • support React 19 ([8bafe25](https://github.com/thebuilder/react-intersection-observer/commit/8bafe25d84ca8af559b0820c9b2e71cec61c8aa1))
  • Drop support for React 15/16. The types are no longer compatible with later version of React, since they have dropped the deprecated types.
v9.13.1
thebuilderthebuilder·1y ago·September 4, 2024
GitHub

🐛 Bug Fixes

  • align IntersectionObserver options with DOM API ([abb4ee8](https://github.com/thebuilder/react-intersection-observer/commit/abb4ee8cbd3d2e661e0ec25870849854f80a2436))
v9.13.0
thebuilderthebuilder·1y ago·July 11, 2024
GitHub

Features

  • fix package exports and simplify build ([#695](https://github.com/thebuilder/react-intersection-observer/issues/695)) ([c9cef8f](https://github.com/thebuilder/react-intersection-observer/commit/c9cef8fd0d3e611daa9697f9630d29d31d78767a)) - All thanks go to @RobinTail
v9.12.0
thebuilderthebuilder·1y ago·July 11, 2024
GitHub

Features

  • upgrade to Vitest 2 ([#690](https://github.com/thebuilder/react-intersection-observer/issues/690)) ([054adf4](https://github.com/thebuilder/react-intersection-observer/commit/054adf4c2ecbb6ceb7cb493b65be5027537da1c5))
  • Upgrade to Vitest 2
  • Add basic browser mode test, that runs with an unmocked IntersectionObserver
  • Types cleanup in `test-utils`, getting rid of `@types/jest` (replaced with vitest)
  • Move test mocking setup from beforeEach to beforeAll
v9.11.0
thebuilderthebuilder·1y ago·July 11, 2024
GitHub

Features

  • remove script to publish dist dir ([0980efa](https://github.com/thebuilder/react-intersection-observer/commit/0980efa2e1dcd311f37793616eac4be96568f047))
v9.10.3
thebuilderthebuilder·2y ago·June 5, 2024
GitHub

🐛 Bug Fixes

  • test-utils - execute mockClear method only when it exists ([712ae37](https://github.com/thebuilder/react-intersection-observer/commit/712ae375e3bef4950ac0c7328c97d8dd821bad3a))
v9.10.2
thebuilderthebuilder·2y ago·May 3, 2024
GitHub

🐛 Bug Fixes

  • support old act from react-dom ([0e95b5d](https://github.com/thebuilder/react-intersection-observer/commit/0e95b5d8ed255c5809db622cc4c3181d7cce4d74))
v9.10.1
thebuilderthebuilder·2y ago·April 29, 2024
GitHub

🐛 Bug Fixes

  • use act from `react` instead of deprecated one ([87258aa](https://github.com/thebuilder/react-intersection-observer/commit/87258aad04b26f3447f7c9051d1474ec063202ea))
v9.10.0
thebuilderthebuilder·2y ago·April 28, 2024
GitHub

Features

  • replace codesandbox with stackblitz ([b0205ee](https://github.com/thebuilder/react-intersection-observer/commit/b0205eef425bbbddd3c1d1631831a47081ca2157))
v9.9.0
thebuilderthebuilder·2y ago·April 28, 2024
GitHub

Features

  • replace codesandbox with stackblitz ([efac8ee](https://github.com/thebuilder/react-intersection-observer/commit/efac8ee92d834513158bf5f14c3bd86def43ad9a))
v9.8.2
thebuilderthebuilder·2y ago·April 8, 2024
GitHub

🐛 Bug Fixes

  • test utils, only use act when in an act environment ([3c515e7](https://github.com/thebuilder/react-intersection-observer/commit/3c515e73189f814546617e60c6030d3b11e1cb59))
v9.8.1
thebuilderthebuilder·2y ago·February 22, 2024
GitHub

🐛 Bug Fixes

  • include "type": "commonjs" in package.json ([684affe](https://github.com/thebuilder/react-intersection-observer/commit/684affe41fd07584e50a6f3edaa0585cfc6fe987))
v9.8.0
thebuilderthebuilder·2y ago·February 9, 2024
GitHub

Features

  • export .mts for test-utils ([05236e7](https://github.com/thebuilder/react-intersection-observer/commit/05236e77db68feca2a2e6cebd3fe58c4c060bcf8))
v9.7.0
thebuilderthebuilder·2y ago·February 5, 2024
GitHub

Features

  • migrate to Biome.js formatting ([529b46f](https://github.com/thebuilder/react-intersection-observer/commit/529b46f2a5716e62e0e0a32dff04fe445f87dce9))
  • switch to Biome.js linting ([2b3642f](https://github.com/thebuilder/react-intersection-observer/commit/2b3642fe45629398a72c0a9facc3338e66a3bd12))

📦 Reverts

  • preserve the commonjs in tsconfig.test.json ([61bd06b](https://github.com/thebuilder/react-intersection-observer/commit/61bd06b3d7a57bc450ed21148adb4dfd1b62fca8))
v9.6.0
thebuilderthebuilder·2y ago·February 1, 2024
GitHub

🐛 Bug Fixes

  • mark react-dom as optional ([00a9139](https://github.com/thebuilder/react-intersection-observer/commit/00a9139a6cc5049bdddabaf77023243e8919c3de))

Features

  • add react-dom as a peer dependency ([8f67987](https://github.com/thebuilder/react-intersection-observer/commit/8f67987912c091b1e84bee68509007b568ec38c8))
v9.5.4
thebuilderthebuilder·2y ago·January 31, 2024
GitHub

🐛 Bug Fixes

  • export .d.mts file for types ([7e2c575](https://github.com/thebuilder/react-intersection-observer/commit/7e2c5750d128535ee40b453155db8a72024d4006))
v9.5.3
thebuilderthebuilder·2y ago·November 9, 2023
GitHub

🐛 Bug Fixes

  • add componentDidMount to InView ([5da81d2](https://github.com/thebuilder/react-intersection-observer/commit/5da81d2313d2b50252d5cca4ec920926702869f9)), closes [#649](https://github.com/thebuilder/react-intersection-observer/issues/649)
v9.5.2
thebuilderthebuilder·2y ago·June 28, 2023
GitHub

🐛 Bug Fixes

  • target es2018 ([4c110ac](https://github.com/thebuilder/react-intersection-observer/commit/4c110ace54bdcb93486417bd65a1624bed42f39c))
v9.5.1
thebuilderthebuilder·3y ago·June 20, 2023
GitHub

🐛 Bug Fixes

  • improve bundle output ([b24d9b2](https://github.com/thebuilder/react-intersection-observer/commit/b24d9b2ba2c848c658bab4f555a4a0af4aa545ac))
  • output legacy esm ([00faf77](https://github.com/thebuilder/react-intersection-observer/commit/00faf778511f0641fac502bd0bb823e3b72bb9c7))
v9.5.0
thebuilderthebuilder·3y ago·June 17, 2023
GitHub

💥 Breaking changes

  • Changes the export file names. If you relied on importing files directly, then you'll need to change the imports.
  • Drops bundling the "umd" version. If anyone was relying on this, let me know.

Features

  • support "use client" with tsup ([db2254b](https://github.com/thebuilder/react-intersection-observer/commit/db2254bd0207a3be8cfa7d7ac86f2c80d6d715c5))
  • switch to tsup build ([9bd69f5](https://github.com/thebuilder/react-intersection-observer/commit/9bd69f5467ce656fb17b7cb9cea62ee3c6dd6210))
v9.5.0-beta.2Pre-release
thebuilderthebuilder·3y ago·June 17, 2023
GitHub

Features

  • support "use client" with tsup ([db2254b](https://github.com/thebuilder/react-intersection-observer/commit/db2254bd0207a3be8cfa7d7ac86f2c80d6d715c5))
v9.5.0-beta.1Pre-release
thebuilderthebuilder·3y ago·June 15, 2023
GitHub

Features

  • switch to tsup build ([9bd69f5](https://github.com/thebuilder/react-intersection-observer/commit/9bd69f5467ce656fb17b7cb9cea62ee3c6dd6210))
v9.4.4
thebuilderthebuilder·3y ago·June 1, 2023
GitHub

🐛 Bug Fixes

  • correct the error message that happens if IntersectionObserver is not mocked ([f7da436](https://github.com/thebuilder/react-intersection-observer/commit/f7da43697fc235fcb7c8d3ecb97fc92593887154))