我正在开发一个应用程序,在该应用程序中我使用 react-native-router-flux@4.3.1 进行导航,但出现此错误:
There is no route defined for Key tos.
Must be one of: 'splash','drawer'.
这是我的路由器:
<Router>
<Scene key="root">
<Scene intial key="splash" hideNavBar component={SplashScreen} />
<Drawer hideNavBar key="drawer" component={DrawerContent} drawerWidth={300}>
<Scene
key="drawerChildrenWrapper"
navigationBarStyle={Styles.navBar}
titleStyle={Styles.title}
leftButtonIconStyle={Styles.leftButton}
rightButtonTextStyle={Styles.rightButton}
>
<Scene
initial
key="home"
component={PresentationScreen}
title=""
renderLeftButton={NavItems.hamburgerButton}
/>
<Scene key="tos" component={TOSScreen} title="" />
</Scene>
</Drawer>
</Scene>
</Router>