您如何解决:undefined不是对象(正在评估'this.panResponder.panHandlers')?

问题描述 投票:1回答:1

嗨,我的朋友如何解决这个问题,我有以下代码:

  import React, { Component } from 'react';
        import { Container, Header, Content, SwipeRow, View, Text, Icon, Button } from 'native-base';

            class SwipeRowExample extends Component {   
              render() {
                return (
                  <Container>
                    <Header />
                    <Content scrollEnabled={false}>
                      <SwipeRow
                        leftOpenValue={75}
                        rightOpenValue={-75}
                        left={
                          <Button success onPress={() => alert('Add')}>
                            <Icon active name="add" />
                          </Button>
                        }
                        body={
                          <View>
                            <Text>SwipeRow Body Text</Text>
                          </View>
                        }
                        right={
                          <Button danger onPress={() => alert('Trash')}>
                            <Icon active name="trash" />
                          </Button>
                        }
                      />
                    </Content>
                  </Container>
                );
              }
            }

            export default SwipeRowExample;

获得的消息:未定义不是对象(正在评估'this.panResponder.panHandlers']

但是结果显示:the results displayed

react-native expo native-base
1个回答
0
投票

SwipeRow已从最新版本中删除,他们推荐react-native-swipe-list-view

使用SwipeRow将本机基本版本更改为2.12.0

SwipeRow (removed)

© www.soinside.com 2019 - 2024. All rights reserved.