You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.
Hi, thanks for the awesome library. I need help though with the library's integration with React. Seems like the events are not propagating as well as expected in React. enter fires as soon as the component mounted and leave never fires. Is there a way to make this work with React? Cheers!
The text was updated successfully, but these errors were encountered:
The plugin fires the events when scrolling, that's probably why. I never tried to tie this up with React, but sounds like you should probably use lifecycle hooks if you want to do stuff when mounting / unmounting components.
I've tried putting them in lifecycle hooks, no luck. The events fire every time after I resize the viewport window right after the event supposed to happen. So let's say for enter, after the target element enters the viewport, the callback wouldn't be executed until I resize the window while the element is still in viewport. Probably it's in how React treats (or rather, not treating) changes that happen outside of its virtual DOM. If that assumption is true however, I'm not sure of how to force it to be aware of the changes made by the library.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, thanks for the awesome library. I need help though with the library's integration with React. Seems like the events are not propagating as well as expected in React.
enter
fires as soon as the component mounted andleave
never fires. Is there a way to make this work with React? Cheers!The text was updated successfully, but these errors were encountered: