Replies: 3 comments 5 replies
-
This is happening for me only in debugging mode in Android |
Beta Was this translation helpful? Give feedback.
0 replies
-
Did you ever figure this out? |
Beta Was this translation helpful? Give feedback.
5 replies
-
I will close this discussion. In case anyone encounters a similar problem, please make sure that the color variable you pass to the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I get an error "[object Object]" is not a valid color or brush, when I try to run the code on android.
import React, {memo} from 'react';
import Animated, {
useAnimatedProps,
interpolateColor, useDerivedValue, useSharedValue, useAnimatedStyle, withTiming,
} from "react-native-reanimated";
import {Path} from 'react-native-svg';
import {Platform, StyleSheet} from 'react-native';
const AnimatedColor = memo(props => {
const {
progress,
unCheckedBorderColor,
checkedBorderColor,
unCheckedBackgroundColor,
checkedBackgroundColor,
height,
width,
} = props;
const AnimationColor = Animated.createAnimatedComponent(Path);
const animation = useAnimatedProps(() => {
const fill = interpolateColor(
progress.value,
[0, 1],
[unCheckedBackgroundColor, checkedBackgroundColor],
);
const stroke = interpolateColor(
progress.value,
[0, 1],
[unCheckedBorderColor, checkedBorderColor],
);
return {fill, stroke};
});
return (
<>
</>
);
});
Beta Was this translation helpful? Give feedback.
All reactions