-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[BUG] AnimatePresence gets stuck when state changes quickly #2554
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
2. Describe the bug
Framer Motion v11.0.12: When state changes very quickly AnimatePresence gets stuck and out of sync and no longer removes the element but instead always animates it in. Reverting to version v10.12.2 (based of other bug report concerning a similar/same issue) does not exhibit the same problem
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/serene-brattain-qwd278
4. Steps to reproduce
- Conditionally render an element inside AnimatePresence with an exit animation
- Trigger condition change quickly
- Animating component gets stuck as rendered, and any changes to the condition will just trigger an reset from initial => animate. The component is no stuck as visible and will never leave the DOM.
5. Expected behavior
The component should not get stuck as mounted
6. Video or screenshots
If applicable, add a video or screenshots to help explain the bug.
7. Environment details
Chrome 122, Mac Sonoma
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working