-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Description
When you updating linear-gradient values - Android app crash with error:

minimal repro:
const timer = useSharedValue(0);
useEffect(() => {
timer.value = withRepeat(withTiming(1, { duration: 1000 }), -1, true);
}, []);
const backgroundStyle = useAnimatedStyle(() => {
const topColor = interpolateColor(timer.value, [0, 1], ['#000', '#FFF']);
const bottomColor = interpolateColor(timer.value, [1, 0], ['#000', '#FFF']);
return {
experimental_backgroundImage: `linear-gradient(to bottom, ${topColor}, ${bottomColor})`,
};
});
I see #7929 not done and not merged, maybe that need slight attention?
Steps to reproduce
- Render
Animated.View
withexperimental_backgroundImage: "linear-gradient"
with updating
Snack or a link to a repository
TODO
Reanimated version
4.1.2
Worklets version
0.6.0
React Native version
0.81.4
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native CLI
Architecture
New Architecture (Fabric renderer)
Build type
Debug app & dev bundle
Device
Android emulator
Host machine
macOS
Device model
No response
Acknowledgements
Yes