# @nativescript-use/nativescript-intersection-observer

> Add a plugin description

Latest version **0.0.2** (published 2023-09-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @nativescript-use/nativescript-intersection-observer
pnpm add @nativescript-use/nativescript-intersection-observer
yarn add @nativescript-use/nativescript-intersection-observer
bun add @nativescript-use/nativescript-intersection-observer
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-09-16 |
| First published | 2023-09-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 48 |
| Author | Juan de Dios Martínez Vallejo |
| Maintainers | vallemar89 |
| Keywords | NativeScript, JavaScript, TypeScript, iOS, Android |

## Links

- npm: https://www.npmjs.com/package/@nativescript-use/nativescript-intersection-observer
- Repository: https://github.com/NativeScript-Use/NativeScript-Use
- Issues: https://github.com/NativeScript-Use/NativeScript-Use/issues
- npm.io page: https://npm.io/package/@nativescript-use/nativescript-intersection-observer

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2023-09-16
- 0.0.1 — 2023-09-16

## README

# @nativescript-use/nativescript-intersection-observer

```javascript
npm install @nativescript-use/nativescript-intersection-observer
```

## Usage

```ts
import { IntersectionObserver } from "@nativescript-use/nativescript-intersection-observer"

const intersectionObserver = new IntersectionObserver();

// Track if `targetView` is visible
intersectionObserver.track(targetView, scollView, (isVisible) => {
    console.log("isVisible: " + isVisible);
})

// Stop track
intersectionObserver.stopTrack();

// Check if is visible view
const isVisible = intersectionObserver.isVisible(targetView, scollView);


Type declaration
```ts
export declare class IntersectionObserver {
    track(view: View, parentView: ScrollView, callback: (isVisible: boolean) => void): void;
    topTrack(parentView: ScrollView): void
    isVisible(view: View, parentView?: View): boolean;
}
```

## License

Apache License Version 2.0

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