motion
motion copied to clipboard
[BUG] `AnimatePresence` does not execute exiting animations in sequence during fast renders
1. Read the FAQs 👇 ✅
2. Describe the bug
Items with an exit animation within the <AnimatePresence /> component do not reliably exit in sequence during fast renders.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug https://codesandbox.io/p/devbox/dreamy-liskov-q35pmx
4. Steps to reproduce
- Click on the 'Add' button a few times in quick succession.
- Notice that the list items that appear below the button exit in a non-sequential order.
5. Expected behavior The list items should exit in sequential order even during fast renders.
6. Video or screenshots
https://github.com/framer/motion/assets/62209188/d73c8cdc-8cdd-4037-adda-d9cd901c613c
Notice that 'hey 6' jumped above 'hey 5' at the 0:04 second mark, while 'hey 7' disappeared before it's supposed to.
Working on a fix for this