-
Notifications
You must be signed in to change notification settings - Fork 50
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
feat(wallet-mobile): Add slide in and out animations #3791
Conversation
}, [fadeIn, fadeOut]) | ||
|
||
React.useEffect(() => { | ||
// When executed without setTimeout, the animation does not start |
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.
2 guesses here, probably mounting issue, try to wrap the fadeIn within the useLayoutEffect
it should work, otherwise you can leverage -> requestAnimationFrame
as well.
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.
This works well now, thanks!
const fadeInTimeout = setTimeout(() => fadeIn(), 1) | ||
return () => clearTimeout(fadeInTimeout) |
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.
const fadeInTimeout = setTimeout(() => fadeIn(), 1) | |
return () => clearTimeout(fadeInTimeout) | |
fadeIn() |
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.
needs testing, cuz if its not an issue on mounting, better run with InteractionManager or requestAnimationFrame.
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.
maybe animations clashing
Screen.Recording.2025-01-20.at.14.16.58.mov |
Description / Change(s) / Related issue(s)
Add toast notification animations
Ticket
YV-199