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
So in my project (next) I used the useMediaQuery hook in combination with the useScrollAnimation hook to do a have a custom scroll trigger animation per screen size.
As soon as the isLargeViewport changes the scroll animation is re-created causing the original timeline to get killed (on the useAnimation's useEffect cleanup. This does indeed clean the animations but it causes an extra pin container in the DOM and for some reason the "pinned" element just disappears as soon as the end market hits the end.
This would be a lovely suggestion, especially when re-initialising transitions as it returns to the default state (if a dependency changes). But I do think it needs some testing indeed.
When we cleanup a component, this will revert to the base state. So could this also mean you might see the component 1 frame in the default state again (when animation out especially) before it gets removed from the DOM?
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
@mediamonks/[email protected]
for the project I'm working on.So in my project (next) I used the
useMediaQuery
hook in combination with theuseScrollAnimation
hook to do a have a custom scroll trigger animation per screen size.As soon as the
isLargeViewport
changes the scroll animation is re-created causing the original timeline to get killed (on theuseAnimation
'suseEffect
cleanup. This does indeed clean the animations but it causes an extra pin container in the DOM and for some reason the "pinned" element just disappears as soon as the end market hits the end.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: