-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Note: seems to be related to this prior regression (also related to refs, if I recall correctly): #3369
1. Read the FAQs 👇
I read them and I don't believe I'm encountering any of these issues.
2. Describe the bug
In 12.24.3, I've got no issues with the code in the sandbox (it handles enter/exit animations as expected). Once I update to a newer version, it seems like AnimatePresence is no longer handling exit animations. In my case, it's leaving my dialogs rendered on screen, even when their state is closed.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/qpkkkh
4. Steps to reproduce
Steps to reproduce the behavior:
- Wrap elements in AnimatePresence
- Add animation variants
- Attempt to change the presence state
5. Expected behavior
In this case, when a dialog's open/close state changes from open -> closed, I'd expect AnimatePresence to exit the dialog.
6. Video or screenshots
The sandbox should show it clearly.
7. Environment details
OS: MacOS
Browsers: FireFox, Chromium
This is in a single-page application with no SSR.