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

Update screen title to that of selected tab navigation

I am in the process of implementing drawer navigation with nested tab navigation within my app. At present I have two issues that I cannot work out so far and am looking for pointers. I am using React Navigation v6. Upon clicking any of my tab…
Richlewis
  • 15,070
  • 37
  • 122
  • 283
2
votes
1 answer

how to get a query params in react native deep linking

I have implemented deep linking in my app. My app is opening using added links but unable to get query params from one link here is the code of my deep linking config const linking = { prefixes: ['demo://'], config: { screens: { …
2
votes
1 answer

Error rendering JW Player - should have parent view controller: but actual parent is:

We have a problem with a React Native app throwing a parent view controller error with the https://github.com/chaimPaneth/react-native-jw-media-player component (React Native wrapper around the native libs) Essentially we have the component working,…
Cheyne
  • 1,964
  • 4
  • 27
  • 43
2
votes
1 answer

Annotating useNavigation type when it is used in a generic component

TLDR: Is it possible to annotate the useNavigation hook in a generic component? If I create a component that uses the useNavigation() hook is there a way to have it correctly type the hook when it is used in multiple screens? The docs…
2
votes
1 answer

best practices implementing deep linking in react native

I would like to know best practices implementing deep linking in react native/react navigation, naming conventions for schema, support of multiple deep links etc.
Cristian Flórez
  • 2,277
  • 5
  • 29
  • 51
2
votes
2 answers

when I'm using DrawerItemList the app crashes

I'm trying to create a drawer menu using react navigation. I want to use a custom DrawerContent, and when I'm using the the app crashes with this error: "undefined is not an object (evaluating 'state.routes')". If I comment this specific line the…
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
1 answer

Getting error while using useHeaderHeight() in unit-testing

Using @react-navigation/stack library in my project, while doing unit testing (using jest) I am getting this error Couldn't find the header height. Are you inside a screen in Stack? index.spec.js it('should have a title and subtitle', () => { …
2
votes
3 answers

Uncaught TypeError: Cannot read properties of undefined (reading 'navigate')

I am new to react native and react navigation and I get this error. Uncaught TypeError: Cannot read properties of undefined (reading 'navigate') I don't understand my because I am just using the same code which already worked, but now it's not…
2
votes
0 answers

How to make instagram-like search input UI with modal suggestions behavior react native

I'm building a social media application with React Native, and I have a search page containing a search box and some other content on the page. When a user clicks or focuses in the search box, I want to cover the rest of the content excluding the…
2
votes
1 answer

react navigation drawer reopen after navigate to screen

I'm working on a simple app and have now added drawer navigation, but I'm having a weird problem with the drawer that opens again after navigating to the screen from the drawer content. PlayerZone is a BottomTabNavigation that contains Profile and…
ramiong
  • 91
  • 6
2
votes
1 answer

react-navigation ver6.0 shows an error when using navigation.navigate

What I'm facing When I'm using navigation.navigate('XXXPage'), react-navigation ver 6.0 shows the following error. Argument of type 'string' is not assignable to parameter of type '{ key: string; params?: undefined; merge?: boolean | undefined; } |…
Satoru Kikuchi
  • 1,069
  • 2
  • 21
  • 33
2
votes
2 answers

How to reset/rerender screen you just left with react navigation

So, exactly what the title says, I'm making a react native app and I want the screen that I leave with navigation.navigate() to be "reset" or "rerendered" when I come back to it, because as it is now, when I leave the screen and then come back to it…
m3k_1
  • 383
  • 4
  • 15
2
votes
0 answers

Is there a way to get the stack name of the current active screen?

I have a set of stack navigators in each tabs of tab navigator. When I log the state of the navigation, within any component, i get following payload, import { useNavigation } from "@react-navigation/native"; const navigation =…
Dilshan
  • 2,797
  • 1
  • 8
  • 26