Questions tagged [react-navigation-v5]

729 questions
3
votes
0 answers

Change header for nested stack navigator in React Navigation v5

I'm struggling with this "apparently" simple situation in React Navigation v5. Any help appreciated. I have a stack navigator nested inside a stack navigator and would like to customise only the nested navigator but I can't for the life of me get it…
3
votes
2 answers

react navigation v5 How to reset or replace?

I tried all the examples in the doc but no success. I have component that I am routing from here to component. I need to unmount component A. I've tried REPLACE AND RESET. RootNavigation.navigationRef.current.dispatch(state => { …
3
votes
1 answer

How can i make breadcrumbs/show screens path in react native (I am using react navigation v5)

I want to show the path of the screen/breadcrumbs as I navigate into my nested stack navigator, I am using react-navigation v5.
3
votes
0 answers

Correct way of adding dynamic tab navigation screens: createMaterialTopTabNavigator

Code is working just fine. All I want to know is if this is the correct way of doing it. I want tabs based on values in array so I did this: import React from "react"; import { createMaterialTopTabNavigator } from…
3
votes
1 answer

React Navigation 5 - Deep linking not accepting given path and resolving to state as expected

I am trying to use deep linking for my react native app that uses react navigation 5 and have been following: https://reactnavigation.org/docs/configuring-links Here is what my code looks like: ... const App = observer(() => { const { NavTheme,…
3
votes
1 answer

react-navigation 5: what should be the back-button behaviour with deep nested stack navigators

I am having a hard time understanding how the back-button is supposed to work with @react-navigation/stack (version 5). The problem I am facing is: when I am in a deep nested screen and press the back button, it takes me straight to the top screen…
TheSoul
  • 4,906
  • 13
  • 44
  • 74
3
votes
0 answers

Stack navigator not working in release apk

Here I am trying to implement a nested navigation in which I have A bottom tab navigator A couple of other screens. My app is working fine in debug mode the following pop up is working on debug mode. But it is not working when I releases the apk.…
3
votes
1 answer

React Native Tab nested into Stack navigation v5 - best practice to update header

I am trying to understand what's the best approach to nested React Native Navigation v5. I have a TabNavigation nested into a Stack.Navigator as follow: const MainNavigation = () => { return (
Matteo Galli
  • 645
  • 8
  • 12
3
votes
1 answer

How to use custom theme in react navigation in class components

I'm using react-navigation 5. I wanted to know how can I use custom theme defined colors in my class component(without the hook of useTheme). So that it changes dynamically when the theme changes. This is my custom theme. const DarkTheme = { …
3
votes
2 answers

How to disable swipe action in specific screen on react navigation 5?

im using react navigation 5 on my project, and somewhere in the project i need to make nested navigators like below: *Stack Navigator **Material top tab navigatior ***Material bottom tab navigator **** Stack Navigator My goal is, actually i want to…
Ozzie
  • 475
  • 1
  • 5
  • 20
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…
3
votes
1 answer

Custom icons with react navigation 5

I am trying to use custom icons with a react tabbar navigation. However, all the tutorials and docs always just cover implementing icons by Ionicons or Materialdesign. Is there a way I can implement my own Icons? This is how the code looks like…
3
votes
0 answers

How do I launch a splash screen for every launch in React Navigation V5?

I want to launch SplashScreen, for every App launch where I'll be performing a large number of tasks. Once this is done, I'll navigate to AuthScreen or MainScreen. Since there is no SwitchNavigator in V5. How do I achieve the following…
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 =…