{"repo":"cats-oss/use-intersection","free":true,"listed":false,"github":"https://github.com/cats-oss/use-intersection","clone":"git clone https://github.com/cats-oss/use-intersection.git","description":"React Hooks for IntersectionObserver.","language":"TypeScript","stars":109,"topics":["react","reactjs","react-hooks","intersection-observer"],"license":"MIT","category":"ui-components","readme_excerpt":"use-intersection React Hooks for IntersectionObserver. :dog: See Storybook. Installation Usage Basic This is the simplest example. Custom Root Element This is an example of using scrollable elements other than Viewport. Lazy Image This is an example of an Image component that delays loading. Browser support Supports modern web browser. If your browser does not support IntersectionObserver , we recommend using Polyfill. npm package https://www.npmjs.com/package/intersection-observer CDN https://polyfill-fastly.io/v3/ API The following resources will help you. - React Hooks - Intersection Observer --- useIntersection useIntersection returns a flag whether the target intersects. options: IntersectionOptions callback: IntersectionChangeHandler CHANGELOG See CHANGELOG.md. Contributing We are always welcoming your contribution :clap: 1. Fork (https://github.com/cats-oss/use-intersection) :tada: 1. Create a feature branch :coffee: 1. Run test suite with the $ yarn test command and confirm that it passes :zap: 1. Commit your changes :memo: 1. Rebase your local changes against the master branch :bulb: 1. Create new Pull Request :love letter: Bugs, feature requests and comments are more than welcome in the issues. Development scripts yarn storybook Run Storybook. yarn test Run Unit test with Jest. yarn lint Run lint with ESLint. yarn format Run formatting with ESLint ( --fix ) and Prettier. License MIT © Cyberagent, Inc","default_branch":null,"files":null,"tree":[],"storefront":"/r/cats-oss","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cats-oss/use-intersection/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}