reactjs - 新路线未显示在 React Native Drawer 中
问题描述
我对 React Native 非常陌生,试图在抽屉中添加一个测试屏幕,但我做不到。
import { createDrawerNavigator, createStackNavigator } from "react-navigation"
/* Some imports here neglected...*/
/*
* icon size
* */
const iconSize = 18
const IntegratedNavigation = createStackNavigator({
bottomNavigator: { screen: BottomNavigator, navigationOptions: { header: null } },
something: { screen: Something, navigationOptions: { header: null } },
something2: { screen: SomethingElse, navigationOptions: { header: null } },
})
export const DrawerNavigator = createDrawerNavigator({
Tabs: {
screen: IntegratedNavigation,
navigationOptions: {
drawerLabel: "Explore",
drawerIcon: ({ tintColor, focused }) => (
<Icon icon={"search"} size={iconSize} color={tintColor}/>
),
header: null,
},
},
PartnersScreen: {
screen: PartnersScreen,
navigationOptions: {
drawerLabel: "Partners",
drawerIcon: ({ tintColor, focused }) => (
<Icon icon={"safety"} size={iconSize} color={tintColor}/>
),
},
},
HelloScreen: {
screen: PartnersScreen, /*This is a testing new drawer tab that never appear!*/
navigationOptions: {
drawerLabel: "Test!",
drawerIcon: ({ tintColor, focused }) => (
<Icon icon={"test"} size={iconSize} color={tintColor}/>
),
},
},
}, {
contentOptions: {
inactiveTintColor: color.palette.lightBlack,
activeTintColor: color.primary,
},
contentComponent: props => (<MenuUserInfo drawerItemsProps={props}/>),
drawerWidth: 240,
},
)
作为测试,我只想将“PartnersScreen”复制为另一个选项卡。但新路线从未出现。我不知道我需要修改哪个其他文件。任何想法?
解决方案
推荐阅读
- vue.js - 如何在 vue 中使用弹性搜索?如何在弹性搜索中存储一些数据?
- laravel - 未找到 Laravel/Lumen 类:LoadEnvironmentVariables
- node.js - 大量的键值集使redis中的连接变慢
- python - 使用 socket.getservbyport 找不到 grpc 服务器
- sql - SQL计算十进制平均值而不是int
- python-3.x - 如何使for循环跳过找不到的元素
- python - SSL:CERTIFICATE_VERIFY_FAILED
- c++ - C++ 中的咖啡馆订单检查器
- qt - 使用 QML 操作 QCamera
- java - java.lang.ClassNotFoundException:从 12.2.1.0.0 升级时 Weblogic 12.2.1.4.0 中的 org.slf4j.Logger