heyman333 / react-animated-numbers

👾 Library showing animation of number changes in react.js
MIT License
246 stars 30 forks source link

Error when unmounting the component while the animation is still in progress #18

Closed markolucky7 closed 3 years ago

markolucky7 commented 3 years ago

Warning: 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 a useEffect cleanup function.

This error occurs if the parent component of the AnimatedNumbers is unmounted while the animation is in progress.

heyman333 commented 3 years ago

hey @markolucky7 Really Thank you for your feedback 👍👍👍

I wii fix it asap

markolucky7 commented 3 years ago

@heyman333 have you had the chance to check out the issue? 🙏

heyman333 commented 3 years ago

@markolucky7 not yet😭 If you think this issue is too critical, feel free to contribute directly to code.

But I'll fix it next week

heyman333 commented 3 years ago

@markolucky7 sorry for late reply. Can I know which version you are using? I did a simple test and there is no problem

If you are not using the latest version, try using the latest version.

https://user-images.githubusercontent.com/22214150/139816095-9f4429eb-8c40-4063-aacf-fa1717aa9e7d.mov

markolucky7 commented 3 years ago

@heyman333 You are right! It works with the version 0.7.0. I was using the version 0.6.1 🙇