# react-window-detect-dimensions

> React component to detect window size change

Latest version **0.2.0** (published 2018-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-window-detect-dimensions
pnpm add react-window-detect-dimensions
yarn add react-window-detect-dimensions
bun add react-window-detect-dimensions
```

## 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.2.0 |
| Published | 2018-03-15 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | chilijung |
| Maintainers | chilijung |

## Links

- npm: https://www.npmjs.com/package/react-window-detect-dimensions
- Repository: https://github.com/Canner/react-window-detect-dimensions
- Homepage: https://github.com/Canner/react-window-detect-dimensions#readme
- Issues: https://github.com/Canner/react-window-detect-dimensions/issues
- npm.io page: https://npm.io/package/react-window-detect-dimensions

## Recent versions

- 0.2.0 (latest) — 2018-03-15
- 0.1.0 — 2018-03-06

## README

# react-window-detect-dimensions [![NPM version][npm-image]][npm-url]  [![Dependency Status][daviddm-image]][daviddm-url]
> React component to detect window size change

## Installation

```sh
$ npm install --save react-window-detect-dimensions
```

## Usage

```js
class DimensionDemo extends React.Component<{}> {
  render() {
    return (
      <WindowDimensions>
        { ({ windowWidth, windowHeight }) => (
          <div>
            width: {windowWidth}, // get window width
            height: {windowHeight} // get window height
          </div>
        )}
      </WindowDimensions>
    );
  }
}
```

## Start example server

```
npm start
```

## generate demo

```js
npm run gh-pages
```

## License

MIT © [chilijung]()


[npm-image]: https://badge.fury.io/js/react-window-detect-dimensions.svg
[npm-url]: https://npmjs.org/package/react-window-detect-dimensions
[travis-image]: https://travis-ci.org/Canner/react-window-detect-dimensions.svg?branch=master
[travis-url]: https://travis-ci.org/Canner/react-window-detect-dimensions
[daviddm-image]: https://david-dm.org/Canner/react-window-detect-dimensions.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/Canner/react-window-detect-dimensions

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