# react-use-is-scrolled-into-view

> react hook which check virturel dom enters the user's view

Latest version **1.0.4** (published 2019-09-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-use-is-scrolled-into-view
pnpm add react-use-is-scrolled-into-view
yarn add react-use-is-scrolled-into-view
bun add react-use-is-scrolled-into-view
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2019-09-01 |
| First published | 2019-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zach Yu |
| Maintainers | zachyutw |
| Keywords | react-hook, reactjs, scoll |

## Links

- npm: https://www.npmjs.com/package/react-use-is-scrolled-into-view
- Repository: https://github.com/zachyutw/react-use-is-scrolled-into-view
- Homepage: https://github.com/zachyutw/react-use-is-scrolled-into-view#readme
- Issues: https://github.com/zachyutw/react-use-is-scrolled-into-view/issues
- npm.io page: https://npm.io/package/react-use-is-scrolled-into-view

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2019-09-01
- 1.0.3 — 2019-08-21
- 1.0.2 — 2019-08-19
- 1.0.1 — 2019-08-19
- 1.0.0 — 2019-08-19

## README

# react-use-is-scrolled-into-view

> React hook which Check virturel dom enters the user's view.

[![NPM](https://img.shields.io/npm/v/react-use-is-scrolled-into-view.svg)](https://www.npmjs.com/package/react-use-is-scrolled-into-view) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Table of Contents

- [Install](#install)
- [Quick Start](#quick-start)
- [Usage](#usage)
  - [`Individual components`](#inview)
- [FAQ](#faq)
- [Thanks](#thanks)
- [Contributing](#contributing)
- [License](#license)

## Install

```bash
# Yarn
yarn add react-use-is-scrolled-into-view

# NPM
npm install --save react-use-is-scrolled-into-view
```

## Quick Start

```jsx
//
// Individual components
//
import {useRef} from 'react';
import useIsScrolledIntoView from 'react-use-is-scrolled-into-view';
const Example = () => {
    const ref = useRef(null);
    const isIntoView = useIsScrolledIntoView(ref);
    return (
        <div ref={ref}  data-inview={isIntoView}>
         
        </div>
    );
};
```

## Usage

NOTE: React hooks require `react` and `react-dom` version `16.8.0` or higher.

## Related projects

## Thanks
This repo was setup with the help of the excellent [`create-react-library`](https://www.npmjs.com/package/create-react-library) and [`redux-react-hook`](https://github.com/facebookincubator/redux-react-hook/blob/master/README.md).

## Contributing
Zach Yu zachyu.tw@gmail.com

## License

MIT

---
_Source: https://npm.io/package/react-use-is-scrolled-into-view · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
