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

Is there a way to play a number of animations one after the other? #56

Open
husamrahman opened this issue Jan 3, 2022 · 5 comments
Open

Comments

@husamrahman
Copy link

Great work on this library! I was wondering if there was already a built in option to go through a list of animations one after the other? Thank you!

@mifi
Copy link
Owner

mifi commented Jan 5, 2022

Hi! Nothing built in for that. I don't think it belongs as a part of this library as I like to keep it simple.

I would think something like <Lottie animationData={animations[index]} onComplete={() => {setIndex(i => i+1)}} />

@husamrahman
Copy link
Author

Got it thank you! I didn't know we had access to OnComplete.

@deshario9
Copy link

I'm implementing around 25 animations through index, but it seems lagging sometimes

Any proper way to handle huge amount of animations?

Note: All animations was fetched from rest api and stored in redux store

@mifi
Copy link
Owner

mifi commented Aug 12, 2022

@deshario9 are you loading the 25 animations simultaneously (all at once) or in sequence (one by one, unloading the previous one when it's done), care to share some codesandbox?

@deshario9
Copy link

@mifi yeah, I'm loading all of it simultaneously (for now)

Sandbox: https://codesandbox.io/s/lottie-animations-7mqpnx?file=/src/App.js

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

3 participants