Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)