in my HTML/CSS web project I wanted to include a CSS-based animation using @keyframes, which worked like a charm.
Then I tried adding a possibility to only load the animations when they are visible to the viewer using IntersectionObserver – Intersection Observer API.
I’m trying to track element visibility with React/Hooks and the Intersection Observer API. However, I can’t figure out how to set up observation with “useEffect”. Does anybody have any idea how could I do that? Mine solution does not work…