An open API service indexing awesome lists of open source software.

https://github.com/finnfiddle/react-window-size

React HOC that passes browser window size to wrapped component
https://github.com/finnfiddle/react-window-size

Last synced: 10 months ago
JSON representation

React HOC that passes browser window size to wrapped component

Awesome Lists containing this project

README

          

# React Window Size

A higher-order React component that passes the browser window's dimensions as props to the wrapped component.

Example:

```javascript
import React, { Component } from 'react';
import windowSize from 'react-window-size';

class ScreenSize extends Component {

render() {
return (


Screen width is: {this.props.windowWidth}


Screen height is: {this.props.windowHeight}


);
}

}

export default windowSize(ScreenSize);
```