Replies: 3 comments 2 replies
-
You can use "React Intersection Observer" to exit . Cos it always work for me . |
Beta Was this translation helpful? Give feedback.
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 |
Beta Was this translation helpful? Give feedback.
2 replies
-
Its working for as this |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Inzendis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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!
Beta Was this translation helpful? Give feedback.
All reactions