Skip to content

[BUG] - Possible AnimatePresence regression in 12.23.13 #3369

@joshuaslate

Description

@joshuaslate

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.23.12, I've got no issues with the code in the sandbox (it handles enter/exit animations as expected). Once I update, 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:

  1. Wrap elements in AnimatePresence
  2. Add animation variants
  3. 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
I'm having trouble with my screen recording at the moment, but the sandbox should show it clearly.

7. Environment details

OS: Linux (CachyOS)
Browsers: FireFox, Chromium

This is in a single-page application with no SSR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions