Questions tagged [react-navigation-v5]

729 questions
4
votes
1 answer

React Native Navigation Wrap All Screens in a View

Using react-navigation v5, how does one wrap all screens individually in a scroll view and a keyboard safe view? export default function App() { return (
4
votes
2 answers

React Native: How to remove the current stack navigator from the navigation-stack

I am struggling with a situation. So I have three stack navigators. navigator1 => screen1 navigator2 => screen2 navigator3 => screen3, screen4, screen5 I navigate from screen1 to screen2. And then from screen2 to screen3 then screen4 then…
4
votes
1 answer

route.params never updates react navigation v5

The problems is that when I move to a certain screen my headerTitle only sets the initial route.params.counter value but does not update even though counter value is changing every second. route.params.counter in my "ChatMessage" screen doesnt…
4
votes
2 answers

React Navigation 5 headerRight button function called doesn't get updated states

In the following simplified example, a user updates the label state using the TextInput and then clicks the 'Save' button in the header. In the submit function, when the label state is requested it returns the original value '' rather than the…
Dan
  • 1,136
  • 10
  • 24
4
votes
1 answer

React-Navigation-5 : Multiple MaterialTopTabNavigator in the same screen

I am upgrading my project from react-navigation-v4 to react-navigation-v5. I need to have two top bars inside the same screen that divides the screen into two halves but by doing this I get this error: Error : Another navigator is already…
houman.sanati
  • 1,054
  • 3
  • 18
  • 34
4
votes
1 answer

react-navigation 5.x: TS2345: Argument of type ' ... ' is not assignable to parameter of type '... '

I have migrated from react-navigation 4.x to 5.x. Since I am using typescript, I am trying to add the types. I should mention that the functionality works perfectly fine. However, I am getting this typescript error: TS2345: Argument of type…
4
votes
2 answers

react navigation, go back with nested navigation

Stack Navigator : - Login - Register - Activation - Tab Navigator + Home + Histories + Cart + Profile - Outlet - Product I have problem with go back navigation, when I'm in Product Screen I can go to "Cart Screen" using…
4
votes
1 answer

White flicker between screens in createMaterialTopnavigator React Navigation v5

There is a white flicker between the screens in the materialTopNavigator while swiping between screens. There is a drawer navigator which nests a stack navigator which further nests the tab navigator. TabView Code (Where flickr occurs) const…
4
votes
0 answers

React navigation 5 deep linking when using class components

I'm looking for an example of using react navigation 5 with class components - specifically for deep link handling. Since class components can't use hooks the example doc does not help much. My implementation is using getStateFromPath(..) followed…
4
votes
4 answers

Adding a custom 'Add' button to createMaterialBottomTabNavigator in react navigation 5

I'm making a project (react native, expo, react navigation 5) where I wanted to add a custom 'add' button to the bottom tabs, but since... A navigator can only contain 'Screen' components as its direct children ...I needed to find a way to pass…
Osa Gambas
  • 91
  • 1
  • 9
4
votes
0 answers

in Appbar.content has empty space above

I am using the following code to create a header with react-native-paper and react-navigation: return ( {previous ? (
Ryan Pergent
  • 4,432
  • 3
  • 36
  • 78
4
votes
3 answers

Task :react-native-screens:compileDebugJavaWithJavac FAILED

Im using react navigation v5.. installed all the dependencies.. now Im getting above error.. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-screens:compileDebugJavaWithJavac'. >…
Arun.k
  • 165
  • 1
  • 2
  • 11
4
votes
2 answers

React-Navigation v5 - transparency between stack navigators

Hey I have a problem with transparency when using more than one Stack.Navigator. I create 2 Stack.Navigators -> one for Screens, and one for Popups. The issue is, that my Popups has transparent backgrounds, and in this case, i need to show Screens…
3
votes
3 answers

React navigation 6 - navigating from one stack A to stack screen B - why screen B wont call useEffect (but renders)?

I have a nested tabs navigator inside a stack navigator. When I navigate from Tab Screen A to Stack Screen B, B's useEffect is called, all good. When I navigate from Stack Screen C to also Stack Screen B, B's useEffect is NOT called. I dont…
3
votes
0 answers

Upgrade React-navigation from V4.x.x to V5.x.x

Current behavior In my team we would like to upgrade react navigation to V5. Since our codebase is very large we have to do an incremental refactor (Upgrading everything in one shot is impossible). For this reason we would like to use the helper…