问题描述
我正在使用 [email protected]。我想实现嵌套路由器。以下是我尝试过的 -
<Router backAndroidHandler={this.onBackPress}>
<Scene key="root">
<Scene
hideNavBar={true}
key="login"
type="reset"
component={LoginScreen}
initial={this.state.intialvar}
/>
<Scene
hideNavBar={true}
key="landing"
type="reset"
component={LandingScreen}
initial={!this.state.intialvar}
/>
<Scene hideNavBar={true} key="status" component={StatusScreen} />
</Scene>
</Router>
在 LandingScreen Component
内,我有一个标签导航,如下所示 -
<Router>
<Scene
key="root"
tabs={true}
hideNavBar={true}
tabBarPosition="bottom">
<Scene key="dashboard"
title="Dashboard"
initial={true}
hideNavBar={true}
component={Dashboard}/>
<Scene key="Devices"
title="Devices"
hideNavBar={true}
component={DeviceList}/>
</Scene>
</Router>
我在 LandingScreen Component
中有一个按钮,可将用户带到 Status Component
。代码是 Actions.status({...props})
按下此按钮时出现以下错误 There is no route defined for key status. Must be one of: '_dashboard'
在我在 LandingScreen Component
中添加标签导航之前,这曾经有效。我嵌套它的方式有误吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)