React Native: Exception thrown while executing UI block

后端 未结 3 1373
春和景丽
春和景丽 2021-02-18 18:48

I\'m building an iOS react-native app, and I\'m currently using the react-native-swipe-card package to build \"tinder\" like swipe cards for my app. The app works fine however w

3条回答
  •  旧巷少年郎
    2021-02-18 19:42

    As @Peuchele commented, I was getting this same error, and the reason it was happening was because I passed a value into an Animated View that was undefined.

    So, to clarify, make sure any values you pass into a component using an Animated.Value is not undefined.

    The specific code I found at fault was:

    const { value } = props;
    
    this.state = {
      translateYValue: new Animated.Value(value),
    };
    

    And props.value was undefined.

提交回复
热议问题