【发布时间】:2020-02-24 07:12:05
【问题描述】:
这是我的代码
export const DrawerStack = () => {
return (
<Drawer.Navigator
drawerStyle={{backgroundColor: BLUE_COLOR_1}}
drawerContentOptions={{labelStyle: {color: '#FFF'}}}>
<Drawer.Screen
name={HOME_SCREEN}
component={HomeTopTabNavigator}
/>
<Drawer.Screen
name={WALLET}
component={Wallet}
options={{title: 'Wallet'}}
/>...
然后我在堆栈屏幕中引用它,我将其包装在堆栈导航器中
<Stack.Navigator><Stack.Screen
name={HOME_STACK_SCREEN}
component={DrawerStack}
我尝试关注How to get drawer over the header in react navigation?,但这些很快将无法在 v5 中使用,因为导航器无法将另一个导航器作为直接子级
【问题讨论】:
标签: react-native react-navigation-v5