0

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

2
  • can you show stack trace for that error? Commented Apr 14, 2020 at 7:38
  • Please click on Error Image for stack trace of error Commented Apr 14, 2020 at 10:04

1 Answer 1

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 )

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.