useIntersection
IntersectionObserver hook that returns a ref and visibility state.
Installation
Usage
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| threshold | number|number[] | 0 | Visibility threshold(s). |
| rootMargin | string | '0px' | Root margin offset. |
| once | boolean | false | Stop observing after first intersection. |