Questions tagged [react-navigation-v5]
729 questions
3
votes
1 answer
function getFocusedRouteNameFromRoute return undefined route name
I want to get the name of the route that is in focus now, but the getFocusedRouteNameFromRoute function always returns "undefined" in the last route.
My code is like this:
return (

putu eka mulyana
- 331
- 2
- 9
3
votes
2 answers
navigation.goBack() not working in nested navigation
my screens are arranged this way:
main root
Stack navigator has 2 screens
Login
Drawer
The drawer is a Drawer Navigator, having three screens
Home
Profile
Settings
Home is a Bottom Tab Navigator having multiple Screens…

Mukash Wasti
- 135
- 1
- 16
3
votes
0 answers
Appium inspector does not split elements (React-Native app)
React-Native app with + react-navigation-v5
After adding a screen into nested stack navigator can see picture like bellow on screenshots.
[image] source code
[image] appium inspector
Appium cannot split text elements inside view even with…

a million starflakes
- 59
- 3
3
votes
1 answer
React Native Drawer Navigation always closing automatically
I have a React Native app using React Navigation. The app already consists of a Tab Navigator nesting Stack Navigators. Now I additionally wanted to add a Drawer Navigation at the very top level, displaying a custom drawer content.
So my hierarchy…

the_smart_home_maker
- 514
- 4
- 21
3
votes
1 answer
How to enable Drawer Navigation only on specific screen (e.g. Home Screen) [react native] [react navigation]
Use case of this problem is to have Drawer menu like "Settings" available only form "Home Screen". And at "Home screen" could be many buttons that link to other screens of Stack Navigation where Drawer is not available.
Main question is how to…

CodeJoe
- 262
- 2
- 10
3
votes
0 answers
How to define types for shared screens in the react-navigation stack navigators?
If I have two stack navigators which have the same screen, how can I define typescript types for that screen?
If it belongs in only one navigator I would put something like this:
export interface SharedScreenProps {
navigation:…

cinemanja
- 481
- 6
- 19
3
votes
2 answers
Expo + React Navigation + Vercel: Deep Linking not working
I am using expo sdk41, react navigation 5, and vercel to deploy a web-build, built with expo build:web.
When I am developing locally, I can deep link, e.g. http://localhost:19006/sign-in. However when I deploy it to vercel and assign a domain name…

Joey Gough
- 2,753
- 2
- 21
- 42
3
votes
2 answers
What is the best way to implement a loading screen with react navigation (I want to load data into context before navigation is displayed
I don't know if I'm asking this question right but here goes. I use the Context API for storing global state. When the app loads, I'm displaying a Splash Screen (I do this natively and I'm not building a managed app / Expo). In the background I want…

Jo Momma
- 1,126
- 15
- 31
3
votes
2 answers
How to use focus and blur listener in single useEffect react native
As you know in useEffect we return the unsubscribe at the end if we assign any listener to unsubscribe const as shown under
As we Using
useEffect(() => {
const unsubscribe = navigation.addListener('focus', () => {
// code
})
…

AliRehman7141
- 873
- 3
- 12
- 33
3
votes
1 answer
Previous screen is popped with current screen either, when user goes back by device or browser back button in drawerContent, react-navigation v5
I'm using react-navigation-v5 and react-native-web in a monorepo architecture.
My stack hierarchy is like this
-- drawer
|-- splashScreen
|-- authStack
|-- appStack
|-- categoryListScreen
|-- searchScreen
|--…

Mohammad
- 792
- 1
- 7
- 15
3
votes
1 answer
React Navigation Bottom Tabs doesn't work with React Native for Web
I'm building a web app using react-native-web with @react-navigation/bottom-tabs.
But the screen content doesn't appear on the web, it only shows the Tab Bar. It works fine on iOS and Android.
Here is the code:
import {createBottomTabNavigator} from…

Dinh Quan
- 1,257
- 2
- 11
- 10
3
votes
2 answers
React Navigation 5 Nested Screen can't get back to Primary Screen
I'm having trouble figuring out nested navigators. I have a bottomTabNavigator with these buttons:
Home
Stations
-> StationDetail (StationScreen)
Shows
-> ShowDetail (ShowScreen)
On my home tab, I have a horizontal scroll of the same stations…

Marc Pope
- 335
- 1
- 14
3
votes
1 answer
Get everything after the prefix as a param with Deeplinking and React-Navigation-5
I am using react-navigation-5 and deeplinking. I would like to extract everything after the deeplink prefix and pass it as a param.
I have the following
const deeplinking = {
prefixes: ['myapp://'],
config: {
Store: {
…

Gary
- 1,086
- 2
- 13
- 39
3
votes
2 answers
React Navigation : Open drawer when I click on bottom tab navigator
With React Navigation 5, I want to open Drawer when I click on bottom tab navigator (I use material bottom navigator).
I manage to create the bottom tabs buttons and click on them, the home page opens for both tabs (GymIndexScreen or …

Gaylord.P
- 1,539
- 2
- 24
- 54
3
votes
1 answer
How to pass back param to parent screen on BackHandler in react-native?
"react": "16.13.1",
"react-native": "0.63.2",
"@react-navigation/bottom-tabs": "^5.7.3",
"@react-navigation/compat": "^5.2.5",
"@react-navigation/material-bottom-tabs": "^5.2.15",
"@react-navigation/material-top-tabs":…

Luiey
- 843
- 2
- 23
- 50