Questions tagged [react-navigation-v5]

729 questions
14
votes
2 answers

How to resolve React native navigation Error while installing version 6

I just installed react navigation version 6 and i received below error Attempt to invoke interface method boolean com.swmansion.reanimated.layoutReanimation.NativeMethodsHolder.isLayoutAnimationEnabled() on a null object reference below is my…
14
votes
3 answers

Passing params to tab navigator React Navigation 5

I’m using materialTopTabs and it seems like this loads all the screens in the navigator once its mounted. I have a screen List and inside it a tab navigator with 2 screens: Posts and Users. These two screen both depend on params passed from List.…
13
votes
1 answer

React Native android TextInput fail to show keyboard

I am facing some issue with react native textInput. TextInput was working fine before I added createBottomTabNavigation. It worked fine on IOS but not the Android. I created a sample component and the issue persist. The issue here: when TextInput…
Ping Kee Ng
  • 527
  • 1
  • 5
  • 12
13
votes
1 answer

React Navigation custom navigator transitions

I'm looking to create a Stack Navigator that can handle animating specific elements between 2 screens. Fluid Transitions looked like a library I could use, but it doesn't support react-navigation 5.X. If there's a package that has this functionality…
11
votes
1 answer

React Navigation V5 + Redux Saga: How can I navigate from the Saga?

Issue: React Navigation V5 + Redux Saga: How can I navigate from the Saga? I've tried using CommonActions.navigate(), but that's not working. Am I missing something here? I want to do all of the navigating through the saga incase something goes…
11
votes
6 answers

How to set always first screen of Stack Navigator inside Tab Navigator React Navigation 5

React Navigation 5 I've build a StackNavigator inside of a TabNavigator, and the navigation between home screen and other screens is working. But the problem is,When I move from Tab2 to Tab1 I expect Tab1 always show me first screen of…
osama somy
  • 385
  • 5
  • 16
10
votes
2 answers

React Navigation 5 - How to navigate from headerRight?

i still trying to understand this react navigation 5.0. Fyi i'm using expo, and right now no problem when navigate from one page to other, problem is when i put navigation for the headerRight. i put in headerRight in Stack.Navigator because i want…
abet
  • 219
  • 6
  • 15
9
votes
5 answers

Found screens with the same name nested inside one another. This can cause confusing behavior during navigation. React navigation 5.x

TabScreenStack.js import { StyleSheet, Text, View, Button } from 'react-native'; import React from 'react'; import { createStackNavigator } from '@react-navigation/stack'; import HomeScreen from './home'; import DehazeRoundedIcon from…
NRA 1
  • 137
  • 1
  • 1
  • 10
9
votes
4 answers

A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children

{ isLogin ? : } const ComponentA = () => ( arrA.map( v => ) ) const ComponentB = () => ( arrB.map( v =>…
9
votes
1 answer

Disable animation for a custom header in React Navigation

I would like to disable the screen animation for the header part of the Stack Navigator. I have a common custom Header defined in the Stack Navigator via screenOptions. And have default animations for screen transitions. I want to make sure the…
AbsoluteSith
  • 1,917
  • 25
  • 60
9
votes
4 answers

interface does not satisfy the constraint 'Record'. Index signature is missing in type 'StackParamList'.ts(2344)

With TypeScript 3.9, React Native, React Navigation... I got error: interface StackParamList Type 'StackParamList' does not satisfy the constraint 'Record'. Index signature is missing in type…
8
votes
2 answers

How to reset a Stack in a different Tab using React Navigation 5.x

My app has a TabNavigator with a StackNavigator in each Tab. I'm not resetting the stacks when navigating between them by clicking on different tabs, so when you change tab, the stack contains the previous state. However, occasionally from within a…
8
votes
2 answers

React Navigation v5 won't reset and remove previous routes

I have a login screen which I have placed in stack. After user logs in successfully he is redirected to home screen which is a drawer screen. One of the options of drawer screen is logout, so on click of it user should be logged out. Following is my…
BraveEvidence
  • 53
  • 11
  • 45
  • 119
7
votes
1 answer

How to unmount screen on blur in a StackNavigator?

Im using React Navigation x5, I have StackNavigator that's loading bunch of screens. I want to unmount one particular screen component on blur to get the same result of using unmountOnBlur when using a DrawerNavigator. How can I achieve that?
7
votes
0 answers

React Navigation (native) V5: Problem with Dark Theme. Drawer Navigator Toggle Button does not contrast with the background. Screenshots included

I am setting the theme of my Navigation Container like this import { NavigationContainer, DefaultTheme, DarkTheme, } from "@react-navigation/native"; export default function Navigation() { const colorScheme = useColorScheme(); return ( …
1
2
3
48 49