The children if an AnimatePresence component are not unmounted on exit, when there is a deeply nested motion.div that uses variants. If the nested motion.div uses objects for initial/animate/exit props, it works.
This bug affects version 2.9.0, older versions work.
See: https://codesandbox.io/s/framer-motion-nested-animate-presence-bug-k5gpq
AnimatePresence also doesn't seem to trigger the onExitComplete callback if passed one since 2.9.0
This is fixed in 2.9.2, thanks for the report and clear example!
Most helpful comment
This is fixed in
2.9.2, thanks for the report and clear example!