Questions tagged [react-navigation-drawer]
395 questions
3
votes
1 answer
ReactNative Cannot update a component from inside the function body of a > different component
My HomeHeader component is like this:
import React from "react";
import { View, StyleSheet, Text, Image } from "react-native";
import Icon from "react-native-vector-icons/FontAwesome5";
export default function HomeHeader({ navigation }) {
return…

Vpp Man
- 2,384
- 8
- 43
- 74
3
votes
0 answers
React Navigation + React Native Web - Navigating to same screen multiple times in drawer navigator does not add to browser history
I am using React Navigation v5 with React Native Web to create a chat UI similar to Slack, Discord, Messages for Web, etc. I'm using Drawer Navigator with custom drawer content containing links to a Chat screen passing a param for the chat ID. Using…

skbvc
- 31
- 1
3
votes
1 answer
Material UI Drawer permanent variant not working. Moves out of place
I have created a Material UI Screen. In which have this structure
I have used the variant="permanent" for the Drawer.
Issue: The content inside the…

Aniruddhsingh Rathore
- 271
- 6
- 23
3
votes
0 answers
How to combine createStackNavigator createDrawerNavigator in latest version of react navigation v5
In the latest version of react-navigation v5 how to combine createStackNavigator with createDrawerNavigator
This is my main navigator file.
import InitialScreen from '@InitialScreen'
import SignIn from '@SignIn'
import Home from '@Home'
import…

Pratap Penmetsa
- 1,137
- 17
- 41
3
votes
2 answers
Is is possible to use navigation.toggleDrawer() in navigation options
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 =…
user11912021
3
votes
0 answers
Error resizing header on your second and third page in (reactnative navigation drawer)?
Header size on the first page is correct, but unwanted header size changes occur on the second and third pages?
A strange thing if you rotate the phone everything will be correct.
Maybe this is because it is in their home books or it should be…

Amir Mehrabiani
- 422
- 3
- 8
3
votes
1 answer
Why do I get a blank screen after using Drawer-Navigator in React-Native to navigate to another Navigator?
Edit Snack: https://snack.expo.io/rJfyQLhJ8
I am learning react native using some course material which is pretty outdated. There have been some breaking changes and I am trying to figure things out. This is my Main Component with a few…

Harsha Limaye
- 915
- 9
- 29
3
votes
1 answer
User role wise drawer navigation in react-native
I have added react-navigation-drawer for implementing drawer navigation in my app. I have created a file named PrimaryNav.js and added all navigation code in it.
import Login from './components/Login';
import Employee from…

Maq
- 53
- 1
- 9
3
votes
2 answers
How to call function instead of screen inside Drawer on React Navigation?
I Used "react-navigation": "^4.0.10", "react-navigation-drawer": "^2.3.2",
and implement a drawer and inside them, I added my item, one of them is "Call us" and it should open a phone so I used for it Linking and I don't know if that's a good way…

Oliver D
- 2,579
- 6
- 37
- 80
3
votes
1 answer
How can I enable drawer only on certain screen?
I am using react-navigation and trying to use drawer navigation only on Home Screen.
My code for navigation configuration is like below.
const WIDTH = Dimensions.get("window").width;
const DrawerConfig = {
drawerWidth: WIDTH * 0.83,
//…

kminny
- 219
- 3
- 16
3
votes
2 answers
How to go to initialRoute with react-navigation when exiting a child stack navigator inside a drawer?
I build an app with react-native, expo and react-navigation. I have a main drawer navigator who has in it 2 other stack navigator. One stack navigator have 2 pages; Products and Product. When I click on one product in the Products page, it goes into…

Mike Boutin
- 5,297
- 12
- 38
- 65
3
votes
1 answer
How to include menuIcon to toggle drawerNavigator in nested Drawer/Stack navigation?
I have a drawer navigator with 2 stacks inside. I would like the first screen of each stack to display the hamburger icon in the header, but when moving to the second screen in a stack I want the hamburger to be replaced with a back button.
How do I…

Bryan Campbell
- 285
- 3
- 9
3
votes
1 answer
Drawer navigation with top tabs after login
I've been trying to build an application which will goto login screen after splash. Once the user logs in, it should be directed to a screen which has drawer navigation and tabs in it. I've been trying to implement this using react native expo. It's…

Praneeth Rajarikam
- 88
- 1
- 10
3
votes
1 answer
Refresh component on open from drawer (react navigation)
EDIT: The async calls have now been placed inside an axios.all() call to speed up the process. The problem remains the same.
In my app, when pressing log out on the Login screen, a token that is stored on the device is deleted.
Login.js:
async…

Daan Hendriks
- 148
- 9
3
votes
1 answer
React-Native React-Navigation - Using createDrawerNavigator() renders no component header
I'm trying to implement headers for components using a react-navigation drawer navigator, but using the createDrawerNavigator() method causes the header to be removed completely.
Using the official react-navigation v3 'simple-header-button' snack…
user10546475