Animation issue (some delay appears)
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current Behavior
Some animations have bigger delay than expected
Expected Behavior
No animation delay
Steps To Reproduce
import { View as AnimationView } from 'moti'
const showBlock = () => {
const [isExpanded, setIsExpanded] = useState(false)
<Pressable
onPress={() => {
setIsExpanded(!isExpanded)
}}
>
<Box>
<Text>External Block</Text>
</Box>
{isExpanded && (
<AnimationView
from={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ type: 'timing', duration: 180 }}
>
<Box>
<Text>Internal Block</Text>
</Box>
</AnimationView>
)}
</Pressable>
}
Versions
- Moti: 0.20
- Reanimated: 2.9.1
- React Native: 0.69.6
Screenshots
Reproduction
Reproducible very often
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
animation-delay - CSS: Cascading Style Sheets | MDN
The animation-delay CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform ...
Read more >animation delay not working - Stack Overflow
Okay, I have this text that I want to appear after 20s. I am using the animation-delay property ...
Read more >CSS Animations Not Working? Try These Fixes - HubSpot Blog
Accomplish this with the animation-delay property. Below, the animation has a delay of 4s (four seconds). This Pen is owned by HubSpot on ......
Read more >[Fixed] Animation Delay not working CSS - Weekend Projects
This article will go through a few reasons why when using CSS animations and using the. animation-delay property is not working.
Read more >Keyframe CSS Animation Delay Bug on iOS - Litmus
Found the solution: Use negative delay values. .words-1 span { position: absolute; opacity: 0; overflow: hidden; color: #6b969d; animation: ...
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
Any update on this ?
I’m having a similar issue. I created a simple component to reproduce. As seen on the video, sometime when I toggle my state to switch the visible component, the animation isn’t trigger, so the AnimatesView component remain in the “from” state, so with an opacity of 0.
https://user-images.githubusercontent.com/84029335/202496942-cf1f05ba-9a97-498a-9dc7-169916029ab0.MP4
hmm that could indicate it’s due to reanimated versions. always kinda hard for me to say