react-navigation-drawer

The app is crashing when I navigate while going back using pop()

我与影子孤独终老i 提交于 2021-02-11 13:26:50
问题 Initially, the app was working fine, after which I created a custom stack over Authenticated stack (screens when the user is Authenticated). The app is crashing when I navigate while going back using pop(), but it works fine with navigate or goBack(). inActiveUser => Check for user touch events using Pan Responder, to log out when he is inactive. AuthenticatedNavigator => Routes where the authenticated user is allowed. New stack: New Authenticated stack is implemented over Authentcated stack.

The app is crashing when I navigate while going back using pop()

拟墨画扇 提交于 2021-02-11 13:25:19
问题 Initially, the app was working fine, after which I created a custom stack over Authenticated stack (screens when the user is Authenticated). The app is crashing when I navigate while going back using pop(), but it works fine with navigate or goBack(). inActiveUser => Check for user touch events using Pan Responder, to log out when he is inactive. AuthenticatedNavigator => Routes where the authenticated user is allowed. New stack: New Authenticated stack is implemented over Authentcated stack.

React-Native App getting crashed on navigate

£可爱£侵袭症+ 提交于 2021-02-10 14:21:06
问题 After upgrading React-Native App to below configuration "react": "16.9.0", "react-native": "0.61.5", "react-navigation": "^4.0.10", "react-navigation-stack": "^1.10.3", "react-navigation-drawer": "^2.3.3", "react-redux": "^7.1.3", "redux": "^4.0.4", "redux-promise": "^0.6.0", "redux-saga": "^1.1.3" App getting crashed when redirecting using "this.props.navigation.navigate()" from createStackNavigator page. But when I redirect from createDrawerNavigator to the same page it works. Before

React Navigation 5 Hide Drawer Item

匆匆过客 提交于 2021-01-21 07:36:32
问题 I am trying to hide the ability to press one of my routes in the drawer navigator as it is another navigator and the default location in the app. I want the drawer to simply be used for navigating to extraneous routes that don't fit well into user flow elsewhere. Before React Navigation 5 I was able to achieve this by simply setting drawerLabel: () => null . However now with the changes I cannot figure out how to hide this in the same manner. Below is my current navigator code: const

How to implement drawer navigator in each tab?

大城市里の小女人 提交于 2020-12-15 03:36:54
问题 I want to have drawer navigation in each tab and I followed this approach, but it doesn't work when I switch back to the previous tab (maybe some navigation tree issue). As you can see above, the drawer works fine for the first time in each tab, but when I go back to any already navigated tab and try to open the drawer, the drawer doesn't open for that tab but opens up for the just previous tab. I think there's some navigation issue. HomeBottomTab.js Here, I created a Bottom Tab Navigator and

Is is possible to use navigation.toggleDrawer() in navigation options

爷,独闯天下 提交于 2020-07-16 07:57:26
问题 In my navigation file , when I want to toggle drawer , get the following error : TypeError: navigation.openDrawer is not a function.(In 'navigation.openDrawer()', 'navigation.openDrawer' is undefined) This is my drawer: const DrawerNavigator = () => { return ( <Drawer.Navigator initialRouteName="MYSHIFT" > <Drawer.Screen name="MYSHIFT" component={TopTabNavigator} /> </Drawer.Navigator> ) } And this is my container navigation : const CareworkerNavigation = () => { return ( <NavigationContainer

how to get current routeName in react-navigation-drawer Drawer compoenent?

a 夏天 提交于 2020-05-21 07:35:47
问题 I have created my App Navigator component with these libraries react-navigation react-navigation-stack react-navigation-drawer and drawer is nested inside main stack. Drawer stack const DrawerMenu = createDrawerNavigator( { Home: { screen: Home }, MyAccount: { screen: MyAccount } }, { overlayColor: "rgba(0, 0, 0, 0.7)", gestureEnabled: false, initialRouteName: "Home", contentComponent: Drawer, drawerWidth: styles.drawerWidth } ); const DrawerAppContainer = createAppContainer(DrawerMenu); Main

how to navigate to a particular tab from a drawer navigator menu react native

不羁岁月 提交于 2020-04-11 17:05:12
问题 I have to navigate to a particular tab when pressed from drawer items. I searched around a lot but couldnt find anything relating to my problem i tried to follow this link of navigation actions but couldnt find out how to implement it Navigate to specific tab from Drawer Navigator. const TabNavigator = createMaterialTopTabNavigator( { Upcoming: { screen: UpcomingScreen }, Accepted: { screen: AcceptedScreen }, Ongoing: { screen: OngoingScreen }, Completed: { screen: CompletedScreen }, }, );

how to navigate to a particular tab from a drawer navigator menu react native

醉酒当歌 提交于 2020-04-11 17:05:08
问题 I have to navigate to a particular tab when pressed from drawer items. I searched around a lot but couldnt find anything relating to my problem i tried to follow this link of navigation actions but couldnt find out how to implement it Navigate to specific tab from Drawer Navigator. const TabNavigator = createMaterialTopTabNavigator( { Upcoming: { screen: UpcomingScreen }, Accepted: { screen: AcceptedScreen }, Ongoing: { screen: OngoingScreen }, Completed: { screen: CompletedScreen }, }, );

How to remove reach navigation 5.x warnings

此生再无相见时 提交于 2020-04-10 04:08:53
问题 I am developing a mobile app using react native Expo. I used the React Navigation version 5.x and getting the following warnings: web Compiled with warnings. D:/_expo/navi/node_modules/@react-navigation/routers/lib/module/index.js Attempted import error: 'DrawerActionType' is not exported from './DrawerRouter'. D:/_expo/navi/node_modules/@react-navigation/routers/lib/module/index.js Attempted import error: 'DrawerNavigationState' is not exported from './DrawerRouter'. D:/_expo/navi/node