嗨我有简单的发布列表,并希望浏览每个帖子到他们的页面。我正在使用react-navigation,但它看起来不适用于CardItem。我该如何解决它?这里是代码。所有配置都在MainNavigator中完美完成。如何使用react-navigation导航CardItem?
<Card>
<CardItem>
<Left>
<Thumbnail source={{uri: 'Image URL'}} />
<Body>
<Text>NativeBase</Text>
<Text note>GeekyAnts</Text>
</Body>
</Left>
</CardItem>
<CardItem cardBody
onPress={() => this.props.navigation.navigate('post')}
>
<Image source={{uri: 'Image URL'}} style={{height: 200, width: null, flex: 1}}/>
</CardItem>
<CardItem>
<Left>
<Button transparent>
<Icon active name="thumbs-up" />
<Text>12 Likes</Text>
</Button>
</Left>
<Body>
<Button transparent>
<Icon active name="chatbubbles" />
<Text>4 Comments</Text>
</Button>
</Body>
<Right>
<Text>11h ago</Text>
</Right>
</CardItem>
</Card>
它没有显示任何错误,只是当你点击它不导航。
你提供'在谁呈现navigation'你可以做到这一点的' Card'? –
这将是很好,如果分享你的错误也让我们得到确切的问题。 –
它不显示任何错误消息只是不导航 – Syuzanna