ideas
ideas copied to clipboard
useIntersectionObserver
- https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
Not sure exactly how best to do this. It seems like you might want to use context to get the scrollable container ref, and then some sort of useObserve(ref) API which gets the observer from context and then tells you information about the elements status.
Maybe?
I would like to work on it.
@AjayPoshak still interested? I took a stab at it https://github.com/TejasQ/react-hook-intersection-observer. We can collaborate if you still are.
I wasn't sure since it's been nearly a month since your comment and I haven't seen an update yet. I hope you don't feel like I'm stealing your thunder or anything. I had a legitimate use case where I needed to build this. 😄
@TejasQ I am totally cool with it. I don't have time to do it. So yes, please go ahead and add it.