LottieFiles / lottie-react

lottie web player as a react component
https://lottiefiles.com
MIT License
725 stars 80 forks source link

Warning when I use React Routes #20

Closed AlexisMunozC closed 3 years ago

AlexisMunozC commented 3 years ago

I am using React Routes, and when I change of page where I have a Player component I get this warning in console.

Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

It's probably that you have an asynchronous function running and when I change the path with React Routes the Player component is unmounted but the asynchronous function is not cancelled