我刚刚开始学习反应本机但是id喜欢为应用程序添加抽屉导航器但是我不知道如何能够将它实现到我当前的应用程序中 . 对反应导航的任何改变都已经破坏了它无法修复 . 我目前使用反应原生路由器通量进行导航,但似乎没有我可以找到的这种方法的抽屉选项 .
是否有添加导航抽屉的教程或简单方法?
你可以使用 react-native-router-flux 附带的抽屉,然后按如下方式使用它:
<Drawer hideNavBar key="drawer" contentComponent={Sidebar} drawerIcon={() => <Icon name="menu" size={30} color="#900"/>} drawerWidth={300}> <Scene key="root"> <Scene key="Welcome" component={Welcome} hideNavBar initial afterLogin={() => Actions.Experts()} /> </Scene> </Drawer>
之后,您可以创建名为Sidebar的组件
1 回答
你可以使用 react-native-router-flux 附带的抽屉,然后按如下方式使用它:
之后,您可以创建名为Sidebar的组件