DEV Community

Discussion on: Check if an element is visible with React hooks

Collapse
 
jmalvarez profile image
José Miguel Álvarez Vañó

The performance is good. The callback passed to the IntersectionObserver instance is only called when the intersection state changes (i. e. it's only called when the component goes visible and when it goes invisible).