【发布时间】:2019-04-18 09:37:00
【问题描述】:
我正在尝试通过创建应用程序来学习 React Native。触摸图像后,我希望在当前屏幕上方放置一个新屏幕。
我想我想在onPress 之后使用StackNavigator?我已经阅读过它们,但不知道如何在我当前的代码中使用它们。有什么想法吗??
const listView = ({name, picture}) => {
return (
<View style = {styles.item}>
<TouchableWithoutFeedback onPress={() => //new screen here!!}>
<ImageBackground source = {picture}
resizeMode = 'cover'
style={styles.image}>
<Text style={styles.text}>{name}</Text>
</ImageBackground>
</TouchableWithoutFeedback>
</View>
)
};
如有任何问题,请在 cmets 中留下。
【问题讨论】:
标签: react-native expo stack-navigator onpress touchablewithoutfeedback