react-resize-render
v1.3.7
Published
A react render prop component for react that injects the window dimenions. Uses a single shared, debounced event listener across all instances in your application.
Downloads
33
Maintainers
Readme
react-resize-render
A render prop solution for tracking window resize events in a browser. Uses a single event handler for all instances of the render prop componenent to attempt to maximize perforance by limiting multiple resize events.
Getting Started
npm install react-resize-render -S
// using ES6 modules
import RenderResize from 'react-resize-render';
<RenderResize
render={({width, height}) => {
return (
<div>
{width}px - {height}px
</div>
);
}}
/>