nandorojo/moti

AnimatePresence mode="wait" vs exitBeforeEnter

Closed this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

Do you want this issue prioritized?

  • Yes, I have sponsored
  • Not urgent

Current Behavior

After the initial setup, I tried to use AnimatePresence together with some basic enter and exit animations. I was trying to use the "exitBeforeEnter" prop described in the documentation. After opening the app I received an error that I should replace exitBeforeEnter with mode="wait". After I replaced the prop animations started to work, but the typescript is reporting that the given prop is not existing in the type.

Expected Behavior

Prop types are updated to match the current AnimatePresence logic.

Steps To Reproduce

  1. Install Moti following this tutorial: https://moti.fyi/installation
  2. Add <AnimatePresence> component to your project together with some <MotiView> in it
  3. Use the "exitBeforeEnter" prop and open the app
  4. App Should report render error

Versions

- Moti: 0.28.1
- Reanimated: 3.6.3
- React Native: 0.73.4
- Framer motion: 6.5.1

Screenshots

image
image

Reproduction

  1. Install Moti following this tutorial: https://moti.fyi/installation
  2. Add <AnimatePresence> component to your project together with some <MotiView> in it
  3. Use the "exitBeforeEnter" prop and open the app
  4. App Should report render error

It seems that reason behind this problem, was another dependency which was overriding framer-motion version, closing as not planned.