【发布时间】:2019-12-15 16:47:40
【问题描述】:
我一直在尝试制作导航组件,但遇到了错误。
这是我的 StackNavigation 视图的架构:
const App = createStackNavigator({
Register:{
screen:Registration,
},
Home: {
screen: SwipeNavigator({
Home: {
screen: Record,
left: 'QRcode',
right: 'Conv',
top: 'Profil',
},
QRcode: {
screen: QRcode,
type:'push'
},
Conv: {
screen: Conversation,
type:'push'
},
Profil: {
screen: Profil,
type:'push'
},
}),
navigationOptions: {
header: null,
},
}
});
不幸的是,当我在 SwipeNavigator 中时,我无法去注册。我收到一个错误,表明 this.props.navigation 未定义。
有谁知道我为什么会遇到这个错误以及如何解决它?
提前感谢您的回复
【问题讨论】:
标签: javascript node.js reactjs react-native navigation