AnimatePresence + Hermes doesn't work
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current Behavior
MotiView stuck/freeze appearing animation when wrapped in AnimatedPresence with exitBeforeEnter prop. Patch from https://github.com/nandorojo/moti/issues/195 and changes in https://github.com/nandorojo/moti/pull/200 does not fix this bug.
Bug not exists in moti@0.17.1
Steps To Reproduce
- Only happens when MotiView has multiple animated properties:
<MotiView
from={{ opacity: 0, scale: 0.9 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.9 }}
/>
- Wrap MotiView into AnimatePresence with
exitBeforeEnter
prop - Enable hermes in Podfile
Versions
- Moti: 0.18.0
- Reanimated: 2.9.1
- React Native: 0.67.4 - 0.69
Screenshots
Current Behavior:
https://user-images.githubusercontent.com/7981854/180895644-b2298203-076c-4f2c-9141-57cd4ebf495c.mov
Expected Behavior:
https://user-images.githubusercontent.com/7981854/180895655-e797b750-375e-4837-835b-771cd2808836.mov
Reproduction
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:25 (10 by maintainers)
Top Results From Across the Web
[BUG] AnimatePresence does not work under certain conditions
Describe the bug. I expect AnimatePresence to use the exit prop to animate a motion component when it unmounts.
Read more >Can't get AnimatePresence in Framer Motion to work
I've been trying to get <AnimatePresence> from Framer Motion to work. But for some reason, I can't get it to work. I want...
Read more >Genre in Archaic and Classical Greek Poetry - OAPEN Library
We will not attempt to summarize here all the relevant work of Calame and Nagy, since ... Pindar's ninth paean and the Homeric...
Read more >Installation | Moti
Moti uses Reanimated 2 under the hood to drive high-performance animations on iOS, Android and Web.
Read more >'The Art that Does Not Think': Byzantine 'Decorative Arts' - CORE
works of fine art-especially painting-and therefore relegated them to subordinate status ... Alchermes, H. C. Evans, and T. K. Thomas, eds., Anathemata eor....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the update. I’ll keep looking into it soon when I have some time. I’m convinced it’s a dependency-related issue.
I’ve added a resolution to my package.json for framer-motion:
Then installed the latest Moti and ran
yarn why framer-motion
which results in version3.10.6
. Build and ran my app again but the problem still exists.Reverted back to 0.17.1, build and ran my app and then it works as intended. When using
0.17.1
I do see that<AnimatePresence>
is underlined in my IDE and when hovered refers toimport { Frame, AnimatePresence } from 'framer'
but is imported like so:import { AnimatePresence, MotiView } from "moti"
.