1.2.1 • Published 3 years ago

window-width-react-hook v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

About

This React hook returns the current window width.

Install

npm i window-width-react-hook

Or

yarn add window-width-react-hook

Usage

  1. Include the hook:

    import useWindowWidth from 'window-width-react-hook';
  2. Use it where is needed:

    function App() {
     return (
       <div>
         Current width: {useWindowWidth()}px
       </div>
     );
    }

License

Licensed under the MIT License, Copyright © 2021 AlexWebLab

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago