# react-intersection-observer-hooks

> easy to use hook for intersection observers

Latest version **1.0.0-hotfix-2** (published 2020-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-intersection-observer-hooks
pnpm add react-intersection-observer-hooks
yarn add react-intersection-observer-hooks
bun add react-intersection-observer-hooks
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-hotfix-2 |
| Published | 2020-09-25 |
| First published | 2020-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | GypsyDangerous |
| Maintainers | dav1ds |

## Links

- npm: https://www.npmjs.com/package/react-intersection-observer-hooks
- Repository: https://github.com/GypsyDangerous/use-intersection-observer
- Homepage: https://github.com/GypsyDangerous/use-intersection-observer#readme
- Issues: https://github.com/GypsyDangerous/use-intersection-observer/issues
- npm.io page: https://npm.io/package/react-intersection-observer-hooks

## Recent versions

- 1.0.0-hotfix-2 (latest) — 2020-09-25
- 1.0.0-hotfix-1 — 2020-09-25
- 1.0.0 — 2020-09-25

## README

# use-intersection-observer

> easy to use hook for intersection observers

[![NPM](https://img.shields.io/npm/v/react-intersection-observer-hooks.svg?style=for-the-badge)](https://www.npmjs.com/package/react-intersection-observer-hooks) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=for-the-badge)](https://standardjs.com)

## Install

```bash
npm i use-intersection-observer
```

## Usage

```tsx
import * as React from "react";

import { useIntersectionObserver } from "use-intersection-observer";

const Example = () => {
	const { observe } = useIntersectionObserver(entries => {
		for (const entry of entries) {
			// do stuff with each entry
		}
	});

	return (
		<div>
			<ul>
				<li ref={observe}></li>
				<li ref={observe}></li>
				<li ref={observe}></li>
			</ul>
		</div>
	);
};
```

## License

MIT © [GypsyDangerous](https://github.com/GypsyDangerous)

---

This hook is created using [create-react-hook](https://github.com/hermanya/create-react-hook).

---
_Source: https://npm.io/package/react-intersection-observer-hooks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
