- Notifications
You must be signed in to change notification settings - Fork13
React hook for Window scroll position
License
NotificationsYou must be signed in to change notification settings
rehooks/window-scroll-position
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
React hook forWindow scroll position
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-scroll-position
importuseWindowScrollPositionfrom'@rehooks/window-scroll-position'functionMyComponent(){// optionally you can pass options, those are default:letoptions={throttle:100,}letposition=useWindowScrollPosition(options)// position == { x: 0, y: 0 }return<div/>}
About
React hook for Window scroll position
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.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.