---
search:
  exclude: true
changelog:
  category: Release
  version: 10.0.0
date: '2025-10-28T15:02:34Z'
seo:
  description: >-
    Based on the great work in #718 by @jantimon - This release adds the new
    useOnInView hook. useOnInView hook — a no-re-render alternative to useInView
    that…
title: v10.0.0
type: changelog
---
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 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
