usehooks icon indicating copy to clipboard operation
usehooks copied to clipboard

useIntersectionObserver can only observe one element

Open valerio-pescatori opened this issue 1 year ago • 0 comments

First of all, thank you for this amazing library, it saved me a lot of time!

I am writing some fairly complex logic for which I need an IntersectionObserver that observes more that one element, possibly hundreds. Now, I know I could use more IntersectionObserver instances but that would take a toll on the performances.

So I was searching for a way to observe more that one element with useIntersectionObserver but it seems it's not possible.

I think it would be a good feature and it would make this hook a better abstraction over the native API.

valerio-pescatori avatar Apr 10 '24 13:04 valerio-pescatori