Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const MainTabNavigator = createBottomTabNavigator({
- Home,
- Tenants,
- WorkOrders: {
- screen: WorkOrders,
- navigationOptions: {
- title: 'Work Orders',
- headerTitle: 'Work Orders'
- }
- }
- }, {
- navigationOptions: ({ navigation }) => {
- const { routeName } = navigation.state.routes[navigation.state.index];
- return {
- headerTitle: routeName
- };
- }
- });
- const MainStackNavigator = createStackNavigator({
- MainTabNavigator
- }, {
- defaultNavigationOptions: ({ navigation }) => {
- return {
- headerLeft: (
- <Icon
- style={{ paddingLeft: 10 }}
- onPress={() => navigation.openDrawer()}
- name="md-menu"
- size={30}
- />
- )
- };
- }
- });
- const AppDrawerNavigator = createDrawerNavigator({
- Menu: {
- screen: MainStackNavigator
- }
- });
- const AppSwitchNavigator = createSwitchNavigator({
- Login: { screen: Login },
- Main: { screen: AppDrawerNavigator }
- });
- async
- ...
- console.debug(response.data); // Here the console shows value 10
- NavigationService.navigate('Main', { userID: response.data });
- const { navigation } = this.props;
- const userID = navigation.getParam('userID', '0');
- console.debug(userID); // HERE THE VALUE IS 0, BUT SHOULD BE 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement