-
Notifications
You must be signed in to change notification settings - Fork 53
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
Leaking/performance issues when adding/removing from tree #35
Comments
Thanks for nice report! I also managed to reproduce the issue with your codesandbox. Seems this is an issue with upstream lottie-web. I found these: airbnb/lottie-web#1159 airbnb/lottie-web#2151 The solution is to use something like I will update react-lottie-player with this cloning code, because this is such a sneaky bug and it shouldn't be on the developers' shoulders to have to experience this crash. |
this will be fixed in the next version |
I upgraded to 1.3.2 but with no result... |
I believe your issue is #30, please continue discussion there |
🎉🎉🎉 |
If the player is added/removed from the tree, something internally is leaking and it can cause the animation to jank and then the page to crash.
See this sandbox: https://codesandbox.io/s/elated-tdd-pvhkf?file=/src/App.tsx
Click the toggle button once. Everything works and the animation shows. Click it twice and it might be a bit slower. 3-4+ times (at least on my computer) it slows to a crawl and the page becomes unresponsive.
The text was updated successfully, but these errors were encountered: