window-width-react-hook
v1.2.1
Published
This React hook returns the current window width.
Readme
About
This React hook returns the current window width.
Install
npm i window-width-react-hookOr
yarn add window-width-react-hookUsage
Include the hook:
import useWindowWidth from 'window-width-react-hook';Use it where is needed:
function App() { return ( <div> Current width: {useWindowWidth()}px </div> ); }
License
Licensed under the MIT License, Copyright © 2021 AlexWebLab
