Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/louisgv/react-scroll-bottom-hook
basic scroll bottom hook
https://github.com/louisgv/react-scroll-bottom-hook
Last synced: 3 months ago
JSON representation
basic scroll bottom hook
- Host: GitHub
- URL: https://github.com/louisgv/react-scroll-bottom-hook
- Owner: louisgv
- License: unlicense
- Created: 2019-04-16T08:57:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-18T10:18:20.000Z (almost 6 years ago)
- Last Synced: 2024-09-16T05:28:12.839Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 236 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-scroll-bottom-hook
> yarn add react-scroll-bottom-hook
## wutdis
when you have legal doc and you want to check if user had scrolled to the bottom, this will solve your problem. Here's how:
```tsx
import useScrollBottom from 'react-scroll-bottom-hook'export default function Welcome() {
const [isBottom, scrollRef ] = useScrollBottom()return (
{/* Some super long component her with overflow-y: scroll. attach the ref:*/}
{state.welcome.privacyPolicy.contents}
{/* The isBottom state is handled from the library. Use this to disable the button. */}
Looks Good! I have Read and Agreed to this Privacy Policy.
)
}```
## size
https://bundlephobia.com/[email protected]
![Image of bundle size](./docs/bundlesize.png)
## license
unlicensed, use it how u want xd
## maintainers
+ [louis](https://twitter.com/litbid)