问题
This is the code where I use Animated.text only here. It was working but when I installed react-native-render-html library after that this error comes. However, I have uninstalled that library but still this error comes.
return (
<View style={styles.tabBar}>
{props.navigationState.routes.map((route, i) => {
const color = Animated.color(
Animated.round(
Animated.interpolate(props.position, {
inputRange,
outputRange: inputRange.map(inputIndex =>
inputIndex === i ? 255 : 0
),
})
),
0,
0
);
return (
<TouchableOpacity
style={styles.tabItem}
onPress={() => this.setState({ index: i })}>
<Animated.Text style={{ color }}>{route.title}</Animated.Text>
</TouchableOpacity>
);
})}
</View>
);
Error Image
回答1:
An issue Concerning this problem is opened on github
NativeBase/issues/3109
To solve this: Look for 'Animated.Text.propTypes.style' in node_modules and delete it
( It exists in deferent files on your node_module )
来源:https://stackoverflow.com/questions/61201873/react-native-typeerror-undefined-is-not-an-object-evaluating-reactnative-ani