【问题标题】:Kenburns effect undefined error - React NativeKenburns 影响未定义的错误 - React Native
【发布时间】:2021-06-21 23:01:30
【问题描述】:

我的代码:

              <Swiper
                controlsProps={{
                  dotsTouchable: true,
                  dotsWrapperStyle: { backgroundColor: "lightblue" },
                  dotsPos: "top",
                  DotComponent: ({ index, isActive, onPress }) => (
                    <Button onPress={onPress} style={styles.DOT}></Button>
                  ),
                }}
                loop
                timeout={3}
              >
                {prefixData.length !== 1 ? (
                  prefixData?.map((e, i) => {
                    return _renderKenburnImg(e, i)
                  })
                ) : (
                  <></>
                )}
              </Swiper>

还有:

const _renderKenburnImg = (e: string, i: number) => (
    <View style={styles.IMG_CONTAINER}>
      <KenBurnsImage
        tension={6}
        friction={50}
        imageWidth={Dimensions.get("window").width}
        imageHeight={300}
        sourceUri={{
          uri: e,
        }}
      ></KenBurnsImage>
    </View>
  )

转到最后一张图片后,RN 显示错误:TypeError: undefined is not an object (evalating 'spring.systemShouldAdvance')。请帮忙!谢谢。

【问题讨论】:

    标签: reactjs typeerror native


    【解决方案1】:

    转到rebound.js文件,删除或隐藏与deregisterSpring相关的代码。

    【讨论】:

      猜你喜欢
      • 2016-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-12
      • 1970-01-01
      • 1970-01-01
      • 2020-02-04
      相关资源
      最近更新 更多