Repository navigation
Replies: 3 comments 2 replies
|
You can use "React Intersection Observer" to exit . Cos it always work for me . |
0 replies
|
https://codesandbox.io/p/sandbox/suspicious-cloud-z8mfnp?file=%2Fsrc%2FApp.tsx%3A32%2C39 @Inzendis you can try this out, works for me The reason why its not working for you is because you're rendering the AnimatePresence wrapper conditionally, so when the state becomes false, it gets unmounted and as a result, the exit animation doesn't trigger |
2 replies
Its working for as this |
0 replies
Answer selected by
Inzendis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
So pretty much it works as intented except for the Exit.
I made sure to use "AnimatePresence" before the condition and I gave a unique key to motion.div.
At least to what I have read I have everything set correctly? If someone can help me that would be awesome!
All reactions