motion icon indicating copy to clipboard operation
motion copied to clipboard

[BUG] `AnimatePresence` does not execute exiting animations in sequence during fast renders

Open regexyl opened this issue 2 years ago • 1 comments

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

  1. Click on the 'Add' button a few times in quick succession.
  2. 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.

regexyl avatar Jan 03 '24 04:01 regexyl

Working on a fix for this

regexyl avatar Jan 03 '24 08:01 regexyl