-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Platform: AndroidThis issue is specific to AndroidThis issue is specific to AndroidPlatform: iOSThis issue is specific to iOSThis issue is specific to iOSRepro providedA reproduction with a snippet of code, snack or repo is providedA reproduction with a snippet of code, snack or repo is provided
Description
Description
Simple animations such as animating the height of a component with useAnimatedStyles and withSpring flicker on New Architecture with Fabric.
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-01-03.at.15.50.14.mp4
Steps to reproduce
- Create a shared value:
const height = useSharedValue<number>(0); - Create an animated style:
const animatedStyles = useAnimatedStyle(() => ({ height: height.value })); - Create a function to animate:
const onToggleHeight = () => { height.value = withSpring(height.value > 0 ? 0 : 200) }; - Apply the animated style to a view:
<Animated.View style={animatedStyles} /> - The animation seems to always flicker when animating to
height: 0in this case. I've also seen it happen when animating toopacity: 0in other cases
Snack or a link to a repository
https://github.com/thiagobrez/reanimated-repro
Reanimated version
3.16.6
React Native version
0.76.5
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
arashlabafian, elmehdielhamdi, aeltersxops, henninghall, chapo2501 and 6 morejgo80
Metadata
Metadata
Assignees
Labels
Platform: AndroidThis issue is specific to AndroidThis issue is specific to AndroidPlatform: iOSThis issue is specific to iOSThis issue is specific to iOSRepro providedA reproduction with a snippet of code, snack or repo is providedA reproduction with a snippet of code, snack or repo is provided