Questions tagged [react-navigation-drawer]

395 questions
0
votes
0 answers

How can I create createDrawerNavigator inside createStackNavigator in React native?

I'm using react-navigation v3 for react native app. When I createDrawerNavigator inside createStackNavigator I can't openDrawer but if I createDrawerNavigator in root navigator I can open it. Here is my code. Anyone have a solution for…
0
votes
2 answers

Can't open Drawer react native

I created createDrawerNavigator. But when call "props.navigation.dispatch(DrawerActions.openDrawer())" nothing show. Here is my code. MenuNavigator.js import { createDrawerNavigator } from "react-navigation"; import Login from…
0
votes
2 answers

How to force stackNavigator to target MainScreen?

I have implemented a StackNavigator and a DrawerNavigator, in my DrawerNavigator in the first option I am calling StackNavigator. The problem is that when I'm browsing Stack screens I wanted to go back to the main screen through Drawer but this…
0
votes
1 answer

How to use a navigation button inside a drawer?

I have a button inside a custom drawer, however when trying to use a cross-screen navigation method on this button I get the following error: Error I am using: "react-navigation": "^3.11.1", "react-native": "^0.60.4", "react": "16.8.6". I am…
0
votes
1 answer

Uncaught Error: undefined is not an object (evaluating 'Y.props.navigation') touchableHandlePress@[native code]

I'm adding in the react-navigation header a drawerMenuButton to open the Drawer Menu. The icon appears normally but when pressed returns the error quoted. import React from 'react'; import { View, Dimensions } from 'react-native'; import { Button,…
0
votes
1 answer

React Navigation multiple stack configs

I have a DrawerNavigator with mutiple pages in it, each of these pages are their own StackNavigator, that means I have a stack config for each stack. e.g. export const Stacker1 = createStackNavigator({ Stacker1FirstPage: { screen:…
0
votes
0 answers

The navigation drawer does not refresh until I restart the appliction

I have a problem with React Native Navigation Library, The problem is that I implemented logout in my application that forget the AsyncStorage presistent data, the problem starts when I log to another account without restarting the application, I…
0
votes
1 answer

Custom navigation operation on specific tab button of react-navigation's tab navigator

I wanna open drawer (for example, options menu) from specific button on tab instead of navigating to screen. My current solution was working on react-navigation v2 but as we upgraded from v2 to v3 of react-navigation and v60 of react-native from…
0
votes
1 answer

Add padding to a custom contentComponent for a DrawerNavigator to avoid overlaying the status bar

When using a basic DrawerNavigator, there is proper paddingTop that avoids overlaying content over the status bar; however, when adding a custom contentComponent, the padding is not there. Code:…
0
votes
1 answer

Nested tab navigators don't work inside drawer navigator

I'm trying to embed tab navigators within a drawer navigator, but the drawer navigator sometimes stops working. Code: https://github.com/myplaceonline/testreactexpo/tree/drawernestedtabs To reproduce the problem: Click the Screen2 tab at the…
0
votes
0 answers

Unable to render drawer navigation in React navigation?

Hi Have a react navigation method which make a drawer, which is inside a createSwitchNavigator. But when doing the final call I am not able to render the drawer correctly. I am getting Invariant violation error coming. This is my drawer: const…
0
votes
1 answer

Drawer navigation not displaying in react-navigation

I am using react-navigation 3 versions with react native 0.59 version. I am using switch navigation for the login code. Once I got login it's redirecting to the home screen and other navigation from home screen working fine but drawer icon not…
0
votes
2 answers

React native - onpress doesn't work inside drawer navigation header

I'm trying to add a custom menu icon button inside the navigation header in my react native app. I successfully did that, but the press event doesn't fire as long as the icon is in the header. For example, if I have the icon…
0
votes
1 answer

Set createDrawerNavigator screen title react native

I have below codebase const drNav = createDrawerNavigator( { A: { screen: A, navigationOptions: { title: 'A', }, }, B: { screen: B, navigationOptions: { title: 'B', }, }, C:…
0
votes
1 answer

Problem to return component from StackNavigator in react-native. Get a blank screen but cosole.log is OK

What I want to do is wrapp on the very top of my app a switch navigator named MainNavigator which redirect to a LoadingScreen who determine if user is Logged or no and navigate to AuthNavigator or AppNavigator. AuthNavigator himself is a…