We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3355426 commit 25a93f6Copy full SHA for 25a93f6
docs/useScrolling.md
@@ -0,0 +1,26 @@
1
+# `useScrolling`
2
+
3
+React sensor hook that keeps track of whether the user is scrolling or not.
4
5
+## Usage
6
7
+```jsx
8
+import { useScrolling } from "react-use";
9
10
+const Demo = () => {
11
+ const scrollRef = React.useRef(null);
12
+ const scrolling = useScrolling(scrollRef);
13
14
+ return (
15
+ <div ref={scrollRef}>
16
+ {<div>{scrolling ? "Scrolling" : "Not scrolling"}</div>}
17
+ </div>
18
+ );
19
+};
20
+```
21
22
+## Reference
23
24
+```ts
25
+useScrolling(ref: RefObject<HTMLElement>);
26
0 commit comments