Open MingHieu opened 3 weeks ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hey! 👋
It looks like you've omitted a few important sections from the issue template.
Please complete Steps to reproduce and Snack or a link to a repository sections.
Are you creating the AnimatedPressable out of component ?
Are you creating the AnimatedPressable out of component ?
Yes, is anything wrong?
Hey! If you encounter this issue, can you try using the following code and let me know if it works?
circleSize.value = withRepeat(
withSequence(
withTiming(110, { duration: 1000 }),
withTiming(0, { duration: 0 })
),
-1
);
circleOpacity.value = withRepeat(
withSequence(
withTiming(0, { duration: 1000 }),
withTiming(0.8, { duration: 0 })
),
-1
);
}
Basically, I add withSequence
to the withRepeat
, which resets the value to the desired initial value. Duration is set to 0
, so the value should retain its initial state immediately.
I was trying to reproduce the issue using the latest reanimated version but I cannot see the problem, even if I was using the same code as provided in this issue repro. Maybe upgrading reanimated to the latest version will help you as well with no need to update the implementation.
Description
I'm having a great experience with the animation using
withTiming
, but when I wrap it withwithRepeat
, it causes flickering.Code:
https://github.com/software-mansion/react-native-reanimated/assets/77161145/02bd4094-d951-42f2-8710-f9b651d40390
Steps to reproduce
NA
Snack or a link to a repository
NA
Reanimated version
^3.11.0
React Native version
0.74.1
Platforms
Android
JavaScript runtime
None
Workflow
React Native
Architecture
Paper (Old Architecture)
Build type
None
Device
Android emulator
Device model
Pixel_4_API_34 ( android 14 )
Acknowledgements
Yes