0.1.1 • Published 6 years ago

react-window-bigness v0.1.1

Weekly downloads
399
License
MIT
Repository
github
Last release
6 years ago

React Window Bigness 📏

npm Build Status code style: prettier Netlify Status

Performantly pass window dimensions as props! 📐

Demo

Render Props Usage:

import * as React from 'react';
import { WindowSize } from 'react-window-bigness';

const MyComponent = () => (
  <WindowSize>
    {({ windowWidth, windowHeight }) => JSON.stringify({ windowWidth, windowHeight })}
  </WindowSize>
);

export default MyComponent;

HOC Usage:

import * as React from 'react';
import { withWindowSize } from 'react-window-bigness';

const MyComponent = ({ windowWidth, windowHeight }) => (
  JSON.stringify({ windowWidth, windowHeight })
);

export default withWindowSize(MyComponent);
0.1.1

6 years ago

0.1.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago