AnimatePresence Exit Animation Skipped When Child Keys Are Not Stable
AnimatePresence is the Framer Motion component that keeps a child mounted long enough for its exit variant to play before React removes it from the tree. Its behavior depends on matching each exiting child to the element that previously occupied that position. When keys are missing, reused, or derived from array indices, that matching becomes ambiguous. The