A quick demonstration of how to do make an infinitely scrolling page using the Intersection Observer API and React hooks. Play around with it here. Read the accompanying blog post here.
- Intersection Observer API
- React Refs for DOM referencing
- A couple of built-in React hooks a custom
useIntersecting
hook
git clone https://github.com/sroelants/intersection_observer_demo.git
cd intersection_observer_demo/
npm install
npm start