Skip to content
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

Animation stopped when I navigate between screen #119

Open
donatello-duel opened this issue Feb 28, 2024 · 4 comments
Open

Animation stopped when I navigate between screen #119

donatello-duel opened this issue Feb 28, 2024 · 4 comments

Comments

@donatello-duel
Copy link

Hi, I'm facing something weird.
I implemented animation component using react-lottie-player.
It looks working well but I found something weird.
When I navigate on other screen and then come back to animation screen, my animation is freeze.
I am not sure why this happens.
Could you help me with this?
<Lottie animationData={animationData} play={play} onLoopComplete={() => { setPlay(false); }} />

@mifi
Copy link
Owner

mifi commented Feb 28, 2024

if you remove onLoopComplete={() => { setPlay(false); }}, does it work then?

@donatello-duel
Copy link
Author

I mean that instead of playing to the end, it stop midway.

@donatello-duel
Copy link
Author

if you remove onLoopComplete={() => { setPlay(false); }}, does it work then?

It plays to the end if I don't navigate to other screen.

@mifi
Copy link
Owner

mifi commented Feb 28, 2024

maybe if you make a codesandbox or similar, then someone can help you out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants