730 questions
0
votes
0
answers
44
views
React Navigation deep linking
I have a scenario where i want to move to a screen B on click of a deeplink but i want to add a Screen A to the stack so when the user goes back he is navigated to Screen B from Screen A, also while ...
0
votes
1
answer
864
views
How can I insert a button in the tab bar of my React Native app that does not navigate to any screen but instead triggers a custom function?
In my React Native application using Expo, I have a tab bar with multiple screens. I want to add a button in the middle of the tab bar that doesn't navigate to any screen but instead triggers a custom ...
0
votes
1
answer
35
views
Moving to a screen in a nested navigator React Navigation v5
Context
I saw lots of similar questions but no one was a valid answer to my problem.
This is my navigator structure:
MainNavigator (mode="modal", headerMode="none")
- TabNavigator
...
1
vote
0
answers
255
views
Expo not listener to navigate specific screen when app was killed
I had a problem when my app was killed (closed) and I received a notification, I clicked on that and wanted to navigate to some specific screen. I am using expo sdk 49 and expo-notification. I read ...
0
votes
0
answers
64
views
Hide "Navigate up" when pressing back button with react-navigation / react-native-screens
how do i hide the "Navigate up" from the back button when using react-navigation?
It happens when i keep the back button pressed.
Navigate up Image
"@react-navigation/native": &...
0
votes
1
answer
897
views
Adding types for useTheme from @react-navigation/native
I'm tyring to set types for useTheme() from @react-navigation/native. I have setted a theme type before for styled-components, but I can't find a way to set the theme type for react navigation theme.
...
1
vote
0
answers
222
views
React Navigation upgrade v4 to v6 - navigationOptions and listener
Previously with React Navigation v4, I have use route.params.scrollToTop() to pass the function I want to call when tabBarOnPress. The function content is not related to scrollToTop. After upgrading ...
3
votes
3
answers
638
views
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 ...
1
vote
2
answers
1k
views
react-navigation 6 swipe from top to bottom closes current stack screen android 9
I have upgraded from react-navigation 5 to 6:
- "@react-navigation/bottom-tabs": "^5.10.6",
- "@react-navigation/material-top-tabs": "^5.3.15",
- "...
0
votes
1
answer
804
views
How to add Background Image to BottomTabNavigator in React Native
Is there a way to add a Background Image to the bottom navigation bar
I tried using tab bar component but it did not help.
The code that I am using is
//Navigation Options
<Tab.Navigator
...
1
vote
0
answers
130
views
createCompatNavigationProp example?
I'm trying to use the compatibility helper createCompatNavigationProp from https://reactnavigation.org/docs/5.x/compatibility/ but I don't know how to use it.
This is the function if it helps: https://...
0
votes
0
answers
118
views
Passing a function as prop in react native react navigation
Hi I want to add a function to record the value of input and want to use it in all components and input is in another component and I want to pass a function from App.js to that component but it does ...
0
votes
1
answer
765
views
Can expo-based npm packages be used in react-native project or vice-versa?
I want to build a npm package for react-native. Before I get started I have some question in my mind:
Should I start with expo or bare react-native?
If I start with expo, will it run successfully on ...
1
vote
2
answers
2k
views
How can I navigate to a nested stack screen inside a sibling tab while preserving its initial screen? (React Navigation)
The Code:
I'm using React Navigation 6 with the following hierarchy:
MainTabNavigator
HomeStack
HomeScreen (HomeStack initial screen, contains a "Pay" button)
OtherScreen
...
0
votes
1
answer
1k
views
How to make the background of NavigationContainer transparent in react-navigation v5?
I am trying to make the background of NavigationContainer transparent for making the items under bottom to be visible , but it is not working in my case. Please do help if you know how to achieve this ...
5
votes
0
answers
2k
views
Partially transparent modal overlay screen with previous screen in the background in react navigation 5 or 6?
We are currently using react-navigation (5.6) in our react native app.
We use a BottomTabNavigator as the root navigation.
const BottomTab = createBottomTabNavigator()
The individual screens under ...
0
votes
0
answers
130
views
Use an image on multiple screens react native with react navigator
I want to be able to use an image on multiple screens in react native. For example, when the home screen and settings are loaded I want to use an image on both screens, so that it avoids a re-render ...
4
votes
1
answer
3k
views
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 (
<Tab....
0
votes
1
answer
2k
views
Passing params to a screen in many nested navigator but get undefined
I have some trouble to pass a value in a nested navigator with React-Native Navigation v6. I've tried many ways to get the value, but I always get an undefined value. I just started react-native about ...
0
votes
1
answer
1k
views
react-native navigation(v5) deepLinking get params from URL
Have any ideas how can I get correct params ?
I getting this URL and I want navigate to correct screen within correct params.
URL -> /p-einhell-drill-screwdriver-123456/
I want to take form that ...
1
vote
1
answer
928
views
How to switch tab programmatically in react-navigation showing the animation?
I'm using the MaterialTopTabNavigationProp, and need to change the selected tab programmatically.
I just tried using navigation.navigate or navigation.jumpTo, everything works fine, but the changing ...
4
votes
0
answers
661
views
params is cached and shows older values on return to the same screen
I use react-navigation 5 and having issues because the params shows older values.
ScreenList.js
const handleFirstUser = () => {
const userDetail = {'name': 'First User'};
...
0
votes
0
answers
790
views
Bottom Tabbar touchables are red in react-native inspector and not clickable
I'm facing a weird issue with my react-native application which i'm not able to solve.
I use react-navigation in my app and @react-navigation/bottom-tabs for the bottom tab navigator.
While developing ...
1
vote
1
answer
5k
views
How to render material top tab navigator inside a custom header component
I would like to render material top tab navigator created with createMaterialTopTabNavigator() from react-navigation inside a custom header component.
Indeed, my header is a gradient, so I need to ...
14
votes
2
answers
16k
views
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....