Questions tagged [react-navigation-v6]

Version 6 of the routing and navigation library for Expo and React Native apps.

Only use this tag for when V6 specific cases are involved.

See the official docs for changes compared to : https://reactnavigation.org/docs/6.x/upgrading-from-5.x#general-changes

251 questions
2
votes
0 answers

React Navigation v6 Drawer blank screen

I am creating a mobile app using React Native, and I have ended up using react-navigation v6 for creating a drawer navigator in the Dashboard of my app. The Dashboard is only displayed when the user is logged, while the Login screen is shown when…
gusti
  • 393
  • 4
  • 21
2
votes
1 answer

how to handle two drawers separately in react navigation 6?

I have created two Drawer Navigators const MenuDrawerRight = createDrawerNavigator(); const MenuDrawerLeft = createDrawerNavigator(); function RightDrawerScreens() { return (
2
votes
2 answers

React native drawer navigator not opening

I'm building a react native app and using react navigation v6 library. I've built a react navigator that works fine for the most part, but I'm facing this bug when navigating to a certain page. I have a stack navigator:
2
votes
3 answers

How can I close a modally opened window with its own navigation stack?

I have the following structure in my React Native project, suggested by this answer: export const Root = () => { const RootStack = useMemo(() => createStackNavigator(), []); const HomeStack = useMemo(() => createStackNavigator(), []); …
2
votes
1 answer

How to refactor 'createSwitchNavigator' code in react-navigation-6?

Below is the code which uses react-navigation version-4. But in version-6 createSwitchNavigator is completely removed. How do I refactor the below code to make it work? I do not want to use the react-native-compat package. import React from…
Abhishek Vyas
  • 599
  • 1
  • 9
  • 24
2
votes
1 answer

When upgrading react-navigation from v5 to v6, should we still import react-native-gesture-handler at the top?

The documentation for react-navigation v5 mentions this: To finalize installation of react-native-gesture-handler, add the following at the top (make sure it's at the top and there's nothing else before it) of your entry file, such as index.js or…
hndvf
  • 101
  • 8
2
votes
3 answers

Navigate to component screen in parent stack from child stack

I'm trying to navigate to a screen on my Stack Navigation from my topTab navigation but can't find a way around it. I tried using navigation.getParent() but it throws this error TypeError: undefined is not an object (evaluating…
2
votes
0 answers

Back button doesn't show in React Navigation 6.x with nested navigators

My React Native app has a root Stack Navigator with some screens and nested navigators: /* Root Stack Navigator */ const disableBackButtonOpts = { headerBackVisible: false, gestureEnabled: false }
2
votes
2 answers

Why does tabBarIcon not navigate to my component in my Tab.Screen?

When building a custom Tab.Screen I've tried to pass a custom tabBarIcon. While the icon renders it will not navigate to the component TestScreen. In the docs for tabBarIcon my understanding the Tab.Screen should be written as:
2
votes
0 answers

How to add outside box shadow in react navigation bottom tabs?

I would like to add a outside box shadow in react-native-navigation. The desired effect should look like this: Currently when I apply styles the outside box shadow does not change: import React, { FunctionComponent } from 'react' import…
2
votes
0 answers

React Navigation v6 How to create custom Header as own component

could you somebody help me with header bar in react-navigatin v6. My motivation was that I need add image strip like divider instead of default divider under header bar: I want to create own headerbar so I created Navigator: …
2
votes
0 answers

Custom Back Button in react navigation v6

Has React navigation removed headerBackImage in screenOptions to replace back button? Currently, props headerBackImageSource is there where there is a need of passing Image and headerLeft which replaces the backButton by doesn't behave as back…
Hydro
  • 21
  • 1
2
votes
1 answer

How to fix this error: Check the render method of `DrawerNavigator`

When I navigate from signup screen to home screen I have got following error which is mentioned below. Where I have used the nested navigation in react native. This is my app.js import * as React from 'react'; import { NavigationContainer } from…
1
vote
1 answer

iOS App Crashes when Navigating after popToTop()

On iOS, the app crashes when executing navigate("Screen1") after the execution of popToTop(). The app works perfectly fine on Android. props.navigation.popToTop(); props.navigation.navigate("Screen1"); // This statement causes iOS to crash! //…
1
vote
0 answers

React Navigation DeepLinks not working in iOS with AppDelegate.swift

In my React Native app, I had to migrate its AppDelegate from Objective-C to Swift. After the migration, deeplinks stopped working: when a link is used, the app opens but it does not navigate to the desired route, while in Android it works…
Dani
  • 43
  • 1
  • 6