BsScrollPosition
Reason / BuckleScript binding for @n8tb1t/use-scroll-position
Installation
yarn add @ri7nz/bs-scroll-position @n8tb1t/use-scroll-position
Note that you need
react
,reason-react
and@n8tb1t/use-scroll-position
as peer dependencies.
Adjust your bsconfig.json
by adding this package:
"bs-dependencies": [
"reason-react",
"@ri7nz/bs-scroll-position"
]
Usage
open BsScrollPosition;
useScrollPosition(effect);
Basically, support the original API from @n8tb1t/use-scroll-position but little change the API for make it better use in
Reason
.
Changelog
Contribution
Feel Free for contribution on this project.