Skip to content

useIntersectionObserver can only observe one element #294

@valerio-pescatori

Description

@valerio-pescatori

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions