# react-native-inwindow

> Detects if a element is inside a ScrollView or a ListView and reports back

Latest version **0.0.3** (published 2018-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-inwindow
pnpm add react-native-inwindow
yarn add react-native-inwindow
bun add react-native-inwindow
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-10-20 |
| First published | 2018-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | MirinZhang |
| Maintainers | mirinzhang |
| Keywords | react-native, react-native-component, viewport |

## Links

- npm: https://www.npmjs.com/package/react-native-inwindow
- Repository: https://github.com/MiRinZhang/react-native-inwindow
- Issues: https://github.com/MiRinZhang/react-native-inwindow/issues
- npm.io page: https://npm.io/package/react-native-inwindow

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2

## Recent versions

- 0.0.3 (latest) — 2018-10-20
- 0.0.2 — 2018-10-20
- 0.0.1 — 2018-10-19

## README

# react-native-inwindow

Detects if a element is inside a ScrollView or a ListView and reports back

### Install

```bash
npm i -S react-native-inwindow
```

### Usage

```javascript
import { ScrollView, View, Text } from 'react-native';
import InWindow from 'react-native-inwindow';

onViewChange = (isVisible) => {
    if(isVisible) {
        console.log('component is inside window');
    }
}

render() {
    return (
        <ScrollView style={{flex: 1}}>
            <InWindow
                duration={100} // Intervals that check if the element is in the window. default is 100
                active={true} // Check if the element is in the window. defautt is true
                onChange={this.onViewChange}>
                <View style={{flex: 1, height: 40, borderColot: '#f0f', borderColor: 1}}>
                    <Text>react-native-inwindow</Text>
                </View>
            </InWindow>
        </ScrollView>
    );
}
```

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