Replies: 1 comment 8 replies
-
You should just use the library, creating a new hook for each element you need to observe. The library will reuse existing Intersection Observers as long as they have the same settings (threshold, etc). Not sure I follow how you intend to share props between different elements? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please forgive my ignorance, as I'm used to setting up an array of elements for the Intersection Observer API, and I'm not sure if that's the route to take here with motion and this package. Any resources or assistance would be greatly appreciated.
I just have multiple elements that I want to add props to (e.g. 'up, down, fade, slide, etc') on different elements so I can use the same observer for all of them, just passing those animation types in each element.
Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions