React HOC that passes browser window size to wrapped component
npm install react-window-sizeA 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);
``