Package Exports
- react-width-checker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-width-checker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Width checker
Instalation
yarn add react-width-checker
or
npm install react-width-checker
Usage
import { WidthChecker } from 'react-width-checker';
<WidthChecker widthUp={650} widthBelow={1200}>
{({ display }) =>
display && <p>Something you want to show between 650px and 1200px of screen wide</p>
}
</WidthChecker>
Props
- wait - (default 200) time in miliseconds to wait between each debounce tick
- widthUp - (number) bottom range
- widthBelow - (number) upper range
- ssr - (optional, boolean) if you want to render component on server set it to true