- Notifications
You must be signed in to change notification settings - Fork20
React hook for subscribing to window size
License
NotificationsYou must be signed in to change notification settings
rehooks/window-size
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
React hook for subscribing to window size
Note: This is using the newReact Hooks API Proposalwhich is subject to change until React 16.7 final.
You'll need to install
react,react-dom, etc at^16.7.0-alpha.0
yarn add @rehooks/window-size
importuseWindowSizefrom'@rehooks/window-size';functionMyComponent(){letwindowSize=useWindowSize();// {// innerWidth: window.innerWidth,// innerHeight: window.innerHeight,// outerWidth: window.outerWidth,// outerHeight: window.outerHeight,// }// ...}
About
React hook for subscribing to window size
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.