嗨,朋友我在過去2天反應導航,我嘗試了很多事情(文檔似乎對初學者來說似乎並不明顯),所以現在我面臨這似乎有點複雜,我和所以我尋求建議和幫助進行further.following的情況/問題/情景我尋求的幫助幾個問題 -抽屜沒有包括在反應導航中的標題
我用下面的代碼塊,以達到這一點
import React, {Component} from 'react';
import { AppRegistry, View, BackAndroid, StatusBar,} from 'react-native';
import {
NavigationActions,
addNavigationHelpers,
StackNavigator,
DrawerNavigator
} from 'react-navigation';
import LandingScreen from 'src/screens/landingScreen';
import Login from 'src/screens/login'
import SignUp from 'src/screens/signUp'
import ForgotPassword from 'src/screens/forgotPassword'
import Dashboard from 'src/screens/dashboard'
import UserProfile from 'src/screens/userProfile'
export const Drawer = DrawerNavigator({
Dashboard:{
path:'/',
screen:Dashboard,
},
UserProfile:{
path:'/'
screen:UserProfile
},
}, {
initialRouteName: 'Dashboard',
contentOptions: {
activeTintColor: '#e91e63',
},
headerMode: 'screen',
});
const routesConfig = {
Landing:{screen:LandingScreen},
Login: { screen: Login },
SignUp: { screen: SignUp },
ForgotPassword: { screen: ForgotPassword },
Drawer:{screen:Drawer}
};
export const AppNavigator = StackNavigator(routesConfig, {
initialRouteName: 'Drawer'
});
AppRegistry.registerComponent('Riduk',() => AppNavigator);
- 其他問題是如何應該我在我的應用程序在相同的屏幕 添加2個抽屜
您是否找到解決方案? – itsashis4u
我用drawerNavigator作爲我的應用程序的父導航器,看看我的導航結構https://github.com/manjeets12/riduk/blob/master/src/containers/AppNavigator.js –
謝謝,我已經實現了類似解決方案和它的工作 – itsashis4u