Skip to content

react-visibility-sensor with IntersectionObserver#145

Open
markuskr wants to merge 2 commits intojoshwnj:masterfrom
markuskr:markuskr/intersection-observer
Open

react-visibility-sensor with IntersectionObserver#145
markuskr wants to merge 2 commits intojoshwnj:masterfrom
markuskr:markuskr/intersection-observer

Conversation

@markuskr
Copy link
Copy Markdown

This is a first version of react-visibility-sensor using IntersectionObserver (https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).

I implemented a basic version and support for these properties:

  • partialVisible (as boolean, not as offset)
  • offset
  • containment

I think that we want to think how we can support minTopValue as partialVisible since I don't see a 1:1 mapping to the IntersectionObserver API.

This is not intended as a complete solution, merely as the starting point for a discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant