AnimatePresence mode="wait" vs exitBeforeEnter
Closed this issue · 1 comments
MarchewkaMatthew commented
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
- Install Moti following this tutorial: https://moti.fyi/installation
- Add
<AnimatePresence>
component to your project together with some<MotiView>
in it - Use the "exitBeforeEnter" prop and open the app
- 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
Reproduction
- Install Moti following this tutorial: https://moti.fyi/installation
- Add
<AnimatePresence>
component to your project together with some<MotiView>
in it - Use the "exitBeforeEnter" prop and open the app
- App Should report render error
MarchewkaMatthew commented
It seems that reason behind this problem, was another dependency which was overriding framer-motion version, closing as not planned.