Questions tagged [react-navigation-drawer]
395 questions
                    
                    140
                    
            votes
                
                4 answers
            
        material-ui Drawer - findDOMNode is deprecated in StrictMode
I have a simple ReactJS app based on hooks (no classes) using StrictMode. 
I am using React version 16.13.1 and Material-UI version 4.9.10.
In the Appbar I am using Drawer. 
    
        
     … 
        
            
            
                
                    
    
    
         
    
    
                
            
        
    
 
    
    
        angus
        
- 3,210
- 10
- 41
- 71
                    21
                    
            votes
                
                4 answers
            
        add icon to drawer react-navigation v5
I'm trying to add an icon to each of the screens in my react-navigation drawer, but the icon doesn't appear.
Here is my code :
function Drawer() {
  return (
      
        
            
            
                
                    
    
    
         
    
    
                
            
        
     
 
    
    
        nfn
        
- 621
- 2
- 8
- 22
                    17
                    
            votes
                
                1 answer
            
        React Navigation 6 Hide Drawer Item
How can I hide screens from appearing as items in the drawer of @react-navigation/drawer version 6.
In React Navigation 5 it was achieved by creating custom drawer content like this
const CustomDrawerContent = (props: DrawerContentComponentProps) =>…
         
    
    
        Joey Gough
        
- 2,753
- 2
- 21
- 42
                    17
                    
            votes
                
                11 answers
            
        React Navigation 5 Hide Drawer Item
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…
         
    
    
        SKeney
        
- 1,965
- 2
- 8
- 30
                    15
                    
            votes
                
                1 answer
            
        'jumpTo' vs 'navigate' in React (Native) Navigation
Using React Navigation, different types of Navigators have different actions for (programmatically) navigating between screens.
For e.g. the StackNavigator, the 'pop', 'push' etc. have well-documented (different) behavior, compared to the common…
         
    
    
        Chris Johansen
        
- 161
- 6
                    14
                    
            votes
                
                2 answers
            
        How to resolve React native navigation Error while installing version 6
I just installed react navigation version 6 and i received below error
Attempt to invoke interface method boolean com.swmansion.reanimated.layoutReanimation.NativeMethodsHolder.isLayoutAnimationEnabled() on a null object reference
below is my…
         
    
    
        James
        
- 1,124
- 3
- 17
- 37
                    14
                    
            votes
                
                4 answers
            
        withNavigation can only be used on a view hierarchy of a navigator
I'm getting the error:
Invariant Violation: withNavigation can only be used on a view
  hierarchy of a navigator. The wrapped component is unable to get
  access to navigation from props or context
I don't know why, because I'm using…
         
    
    
        BeniaminoBaggins
        
- 11,202
- 41
- 152
- 287
                    13
                    
            votes
                
                3 answers
            
        How to add a Drawer Inside Stack Navigation in React Navigation
I am working on a Practice Project like Login/Register Application and I am using Stack Navigation from react-navigations and it's working perfect,
Now when User Login's he should be redirected to the Dashboard Screen where I want a Drawer to the…
         
    
    
        Irshad Alam
        
- 143
- 1
- 2
- 9
                    9
                    
            votes
                
                4 answers
            
        Header is not showing in react-navigation-drawer React-Native
I am implementing react-navigation-drawer from React Navigation Library. But facing problem related to header. The header bar is not showing in any of the screens.
This is my App.js
import React from "react";
import { StyleSheet, ScrollView, View }…
         
    
    
        Alok Mali
        
- 2,821
- 2
- 16
- 32
                    8
                    
            votes
                
                3 answers
            
        Unsupported top level event type "onGestureHandlerStateChange dispatched in iphone X
I am facing an issue in react-navigation-drawer.
"react-native-gesture-handler": "^1.0.16",
"react-navigation": "^3.3.2"
This two version is installed. A drawer is working properly in Android and iPhone 5S. But, when I ran the app in iPhone X, it's…
         
    
    
        Shashin Bhayani
        
- 1,551
- 3
- 16
- 37
                    7
                    
            votes
                
                0 answers
            
        React Navigation (native) V5: Problem with Dark Theme. Drawer Navigator Toggle Button does not contrast with the background. Screenshots included
I am setting the theme of my Navigation Container like this
import {
  NavigationContainer,
  DefaultTheme,
  DarkTheme,
} from "@react-navigation/native";
export default function Navigation() {
  const colorScheme = useColorScheme();
  return (
  …
         
    
    
        Joey Gough
        
- 2,753
- 2
- 21
- 42
                    7
                    
            votes
                
                2 answers
            
        How to hide Drawer item in react-navigation 5x?
I'm trying to create a Drawer navigation in my app using react-navigation, but I'm having difficult to hide one item.
What I want: create some screens (to navigate inside app), but NOT display those screens in Drawer.
I'm using this doc:…
         
    
    
        Jonis Maurin Ceará
        
- 449
- 1
- 4
- 11
                    7
                    
            votes
                
                3 answers
            
        Highlight Current Active Drawer menu in React navigation v5
I have created a custom drawer navigator using react navigation version: 5.X, 
But the current active tab is not getting highlighted in custom drawer menu.
I have added 'activeTintColor' in DrawerItem element, but it's not getting applied to active…
         
    
    
        Vishal Tank
        
- 153
- 2
- 7
                    7
                    
            votes
                
                2 answers
            
        react navigation - DrawerNavigator for Header Menu icon inside TabNavigator-> StackNavigator
I want to display HeaderLeft Menu icon globally in all screens. When I click on Menu Icon, I need to display Drawer Menu. I use "OpenDrawer", "CloseDrawer" methods for open/close drawer menu. 
But I am always getting "undefined is not a function…
         
    
    
        Inaccessible
        
- 1,560
- 3
- 18
- 42
                    7
                    
            votes
                
                3 answers
            
        opening/closing navigation drawer not working in react native
In my react native app I have created a side menu using Drawer Navigator which is working perfectly when I open it by swiping. But I want to do is to open it on button click. Currently I am trying to do trough navigation props, the related code is…
         
    
    
        kinza
        
- 535
- 11
- 31