When parent is hidden, it will fire onEnter callback anyway
Opened this issue · 1 comments
moyus commented
If I place <Waypoint />
in a hidden parent container, it will fire onEnter
callback immediately as soon as it mounted, even if it's not in viewport. Which seems is a bug?
Here is the reproduce demo: https://codesandbox.io/s/react-waypoint-bug-nr0j4
xyy94813 commented
We can refer to the Intersection Observer Polyfill
first determines whether the element is displayed or not, and then calculates.