【发布时间】:2018-12-27 11:31:39
【问题描述】:
我正在尝试让导航在我的 React Native 应用程序中工作。我已经安装了 V2。以下设置不显示任何选项卡。
Navigation.events().registerAppLaunchedListener(()=>{
Navigation.setRoot({
root: {
topTabs: {
children:[{
stack: {
children: [
{
component: {
name: 'news.MainScreen',
text: 'tab1',
passProps: {
text: 'This is tab 1'
},
options: {
topTab: {
text: "tab 1",
testID: 'NO_IDEA'
}
}
},
},
{
component: {
name: 'news.SplashScreen',
text: 'tab2',
passProps: {
text: 'This is tab 6'
}
},
options: {
topTab: {
text: "tab 21",
testID: 'NO_IDEA_1'
}
}
},
]
}
}],
}
}
})
});
当我编译我的应用程序时,结果如下:
欢迎所有建议。
【问题讨论】:
标签: javascript reactjs react-native navigation react-native-navigation