framer / motion

Open source, production-ready animation and gesture library for React
https://framer.com/motion
MIT License
22.88k stars 766 forks source link

[BUG] AnimatePresence with React Router V6 #2540

Open SinGlEBW opened 4 months ago

SinGlEBW commented 4 months ago
  1. When creating a slide on the React router dom, I periodically receive premature deletion of the outgoing (exit) component.
  2. If you wrap AnimatePresence in a component, you will get an incorrect behavior of the slide direction.
  3. After the animation is completed, it can work again.

https://codesandbox.io/p/sandbox/slidereactroutev6-7dlfvw?file=%2Fsrc%2Fcomponents%2FPageSlideAnnimation.tsx%3A50%2C65

"react": "^18.2.0", "react-dom": "^18.2.0", "framer-motion": "^11.0.3",

Sean-Wilson-Braille commented 3 months ago

The codesandbox is not found