Using IntersectionObserver With React Hooks
In this article I want to demonstrate how to use the IntersectionObserver API built in to most web browsers to better handle infinite scrolling - a common UX pattern found in many applications. For this particular example I’m going to be using React with their new hooks API but this can be easily adapted to work with other frameworks or vanilla JavaScript. As a fan of TypeScript I will also be using TypeScript.