I'd suggest using `IntersectionObserver` when possible as I assume this is more performant: https://developers.google.com/web/updates/2017/09/sticky-headers