Skip to content

How to make it so exit animation doesnt stop inner imageBackground component from stopping the animation? #6337

Answered by MatiPl01
mrmuke asked this question in Q&A
Discussion options

You must be logged in to vote

Hey!

The issue you face is caused by the fact how layout animations work. Technically, the component that will be unmounted no longer receives updates from RN, so animated style no longer applies transformation to your background component. The component you see on the screen during the animation is a snapshot of the component that was rendered on the screen just before it is removed from the component tree.

Solution: Custom exiting animation

There is a workaround in which you have to implement a custom exiting layout animation, which, in fact, will continue your animation from the animated style (see docs for more details).

You can apply a custom exiting animation to the AnimatedImage in…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MatiPl01
Comment options

Answer selected by MatiPl01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants