Learn Intersection Observer In 15 Minutes
Intersection Observer is an amazing tool in JavaScript that allows you to easily and efficiently do pretty much anything based on the visibility of elements.
2021-12-21 19:00:00 - Web Dev Simplified
This is perfect for scroll animations, lazy loading images, infinite scroll, and much more.
Also, Intersection Observer is incredibly performant and flexible which makes it by far the best approach.