question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AnimatePresence + Hermes doesn't work

See original GitHub issue

Is 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

  1. 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 }}
  />
  1. Wrap MotiView into AnimatePresence with exitBeforeEnter prop
  2. 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

https://github.com/davidnum/motibug

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:25 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
nandorojocommented, Aug 25, 2022

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.

0reactions
semvgeloovencommented, Dec 15, 2022

I’ve added a resolution to my package.json for framer-motion:

"resolutions": {
    "framer-motion": "3.10.6"
  }

Then installed the latest Moti and ran yarn why framer-motion which results in version 3.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 to import { Frame, AnimatePresence } from 'framer' but is imported like so: import { AnimatePresence, MotiView } from "moti".

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found