0.1.1 • Published 5 years ago

react-window-bigness v0.1.1

Weekly downloads
399
License
MIT
Repository
github
Last release
5 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

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago