Request: calling to stop animation
Hi, first of all, great package. But I have little problem, when I am redirecting my page to another subpage, there is memory leak. I need in useEffect cleanup function stop animation, but there is no option to stop it, something like, sprite.stop(),.. and this indicate memory leaks in that case.
Hi, @ListeH thanks for taking the time to open the issue. I would love to get to the bottom of this. What are you seeing that indicates the animation is still running? Are there timers still being set? I see that we cancel the requestAnimationFrame on the cleanup of the use effect sounds like that is not enough.
https://github.com/jcblw/react-sprite-animator/blob/master/src/useSprite.js#L138