Questions tagged [react-navigation]

An easy-to-use navigation solution to be used in React Native projects

React Navigation is a easy to use navigation solution for projects. It supports both Android and iOS platforms with platform specific UI design and behavior.

This library completely coded with Javascript which let's you customize any part of it with the desired behavior without the need of any native code knowledge.

It is built and funded by Expo, with contributions from the community.

Resources

8419 questions
2
votes
1 answer

React-Native tabs navigation bug: automatically returns to the first bottomtab visited

if I navigate in a top tab inside the bottom tab 1, and then I try to go to the bottom tab2, after a few seconds it brings me back to the initial bottom tab 1 these are my dependencies: "dependencies": { "@react-native-async-storage/async-storage":…
2
votes
3 answers

Navigation inside class component not working

While using class component I cannot use navigation its telling invalid hooks . How can I use navigation inside class component? this is what i am trying to acheive , navigation option inside class component. actually i a m newbie .Can anyone help…
user19287659
2
votes
2 answers

How to pass data back to previous screen with React Navigation 6. React Native

I am trying to pass the selected data i'm fetching from my rest api back to the previous screen. I followed the docs, but it's not working. Not sure what I am doing wrong. I am updating the state w/ the selected data, and know it's working bc i am…
jdez
  • 189
  • 1
  • 10
2
votes
1 answer

How to remove listener in another screen - React Native

I want to alert a user before leaving a screen (NewNews.js). It works fine, but I do not want it to be called when he click the save button (PreviewSave.js). Remove listeners are no longer maintained. After pressing save button the customAlert is…
2
votes
1 answer

TypeError: undefined is not an object (evaluating 'config.props')

Reloading the application on Android emulator (google pixel 5), I am receiving the following error: screenshot of android emulator with error TypeError: undefined is not an object (evaluating 'config.props') This error is located at: in…
Steven Dew
  • 31
  • 5
2
votes
0 answers

expo typeerror: undefined is not an object (evaluating '_expomodulescore.nativemodulesproxy.exponentconstants')

I suddenly got an issue while running my react-native expo project. It was working perfectly for a week but now I am getting an error "expo typeerror: undefined is not an object (evaluating…
2
votes
1 answer

React Native, passing data between screens when using BottomTabsNavigator

I am trying to make a react native application. I am using Bottom Tab Navigation, and I have 2 screens. On the first screen, a qr code is first scanned, it contains a string, which is written on the screen. Then I would like to write out the…
Fradam95
  • 23
  • 3
2
votes
1 answer

How to stop running old screen on React Native Expo

I use React Navigation for moving the screen. I set stack screen like this:
Jap_ppp
  • 21
  • 2
2
votes
2 answers

Unexpected go back on react-navigation for nested navigations

I am facing a navigation issue in react-native 0.66.4 and react-navigation 4.4.4. I have a Tab Navigation setup that looks like this. Tab Navigation Home Screen A(Intial) Screen B Trade Screen 1 (Intial) Screen 2 Screen 3 Screen 1 Leads…
2
votes
0 answers

re render navigator screen in react navigation

Hi I am using React Navigation (v:6) in my React Native app for navigation. I have a StackNavigator like the following. const AppStackNavigator = createStackNavigator(); export const AppStack = () => { const loggedIn =…
tatasisi
  • 39
  • 8
2
votes
0 answers

This is the best way to use Stack Navigator and Drawer Navigator together?

I've been programming in React Native for a short time, and I know little about react-navigation. After trying a lot I managed to use stack navigator with a custom drawer navigator (side menu), but this seems to be very strange because my stack is…
2
votes
1 answer

Pass params to previous screen on swipe/gesture

I've thoroughly read the documentation on passing params between screens with React Navigation: https://reactnavigation.org/docs/params/ However, all of those examples only work if you are calling navigation.navigate manually and passing the params.…
2
votes
0 answers

Attempt at centring drawer items makes them have zero text

https://snack.expo.dev/5spvLQAsL In the above snack, I have made a simple edit on line 29 from the default: drawerStyle: { flex:1, alignItems: "center", justifyContent: "center" }, Yet, this somehow causes the text to disappear. How can I…
2
votes
2 answers

React Navigation routes disappear from history on navigate

I have a screen in my app (CameraScreen) that is both in my Tab Navigator and Stack Navigator shown below (there are some more Tab Screens and Stack Screens that I removed for simplicity): const TabNavigator = () => { return (
Ken
  • 1,155
  • 2
  • 19
  • 36
2
votes
2 answers

getOptions for react navigation

React navigation has a well documented setOptions. https://reactnavigation.org/docs/navigation-prop However I can't seem to find any method to retrieve the current options for the active navigator. Am I missing something? Or is there a reason why it…
Tony
  • 36,591
  • 10
  • 48
  • 83