Describe the bug
When an exit animation is running while the <AnimatePresence/> component itself gets unmounted, you get an Can't perform a React state update on an unmounted component error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No state update should happen when the parent AnimatePresence is unmounted
Desktop (please complete the following information):
I think i am still running into this issue even at 1.7.
+1
I believe this is still an issue on 2.0.0-beta.77
I think this is resolution.
For anyone getting to this issue. It seems this was fixed in version: [2.6.14] at 2020-09-18.
According to the changelog:
_Fix memory leak error in AnimatePresence._
Here is the sandbox with the framer/motion version upgraded:
https://codesandbox.io/s/cool-grass-wfryu?file=/src/index.js
For anyone getting to this issue. It seems this was fixed in version: [2.6.14] at 2020-09-18.
It looks like that's indeed the the case. I've upgraded and no longer seeing those errors. Thanks for letting us know.
Most helpful comment
I think i am still running into this issue even at 1.7.
https://codesandbox.io/s/blissful-cache-9mmh7