-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Create useVisibilityObserver #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Couple thoughts about making this a little more generic but this will be so nice to use in our projects
Co-authored-by: pleek91 <pleek91@gmail.com>
@marichka-offen thank you so much! One very last thing (I promise). Can you add a link to this new composition in the rood README.md? |
Ofc! |
@pleek91 README is updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANK YOU!
This PR adds the
useVisibilityObserver
composition that is based onuseIntersectionObserver
composition to abstract away the logic for creating and connecting an IntersectionObserver and returns a boolean value if the target element is visible