You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, what a great library of hooks, well done!
Currently I have an issue with the intersectionObserver. In Chrome (not in FF nor Safari) I receive 2 entries in the callback. The first entry has isIntersecting : false and the second has isIntersecting: true. Im not sure why I receive 2 entries via the Intersection callback, but it seems that the first one is obsolete (outdated) and the latest one is the most up to date with the DOM.
@reinos I somehow encountered the same problem occasionally but could not find the 100% reproduce step. Would you please share the reproduce step on how to reproduce it in a minimal demo. Thanks in advance. 😄 😄 😄
Hi,
First of all, what a great library of hooks, well done!
Currently I have an issue with the intersectionObserver. In Chrome (not in FF nor Safari) I receive 2 entries in the callback. The first entry has
isIntersecting : false
and the second hasisIntersecting: true
. Im not sure why I receive 2 entries via the Intersection callback, but it seems that the first one is obsolete (outdated) and the latest one is the most up to date with the DOM.So I feel that the implementation here https://github.com/juliencrn/usehooks-ts/blob/master/src/useIntersectionObserver/useIntersectionObserver.ts#L20-L22 of just getting the first entry is wrong. I think this should just catch the latest one. As it seems there are situations where the
Intersection callback
can give more than one result and where latests one is always the one that is up-to-date.The text was updated successfully, but these errors were encountered: