2.0.0 • Published 6 months ago
@uplift-ltd/use-on-page-scroll v2.0.0
@uplift-ltd/use-on-page-scroll
Installation
npm i --save @uplift-ltd/use-on-page-scroll
API
useOnPageScroll
Hook to handle scroll up/down events. Returns current and previous y position. Cleans up after itself.
import { useOnPageScroll } from "@uplift-ltd/use-on-page-scroll";
useOnPageScroll({
onScrollUp: ([newYPosition, lastYPosition]) => {
console.log(newYPosition, lastYPosition);
},
onScrollDown: ([newYPosition, lastYPosition]) => {
console.log(newYPosition, lastYPosition);
},
});
2.0.0
6 months ago
2.0.0-alpha.0
1 year ago
2.0.0-alpha.1
1 year ago
2.0.0-alpha.2
1 year ago
1.2.4-alpha.0
1 year ago
1.2.4
1 year ago
1.2.3
1 year ago
1.2.3-alpha.1
1 year ago