249 questions
0
votes
0
answers
27
views
Unexpected back behavior when navigating to nested screen react-navigator v6
I'm using React Navigation with a structure where the DrawerNavigator contains multiple StackNavigators. From a screen inside one stack (e.g., HomeStack), I navigate to a nested screen (OrderDetails) ...
1
vote
2
answers
1k
views
React Native Crash - Error: Exception in HostFunction: Loss of precision during arithmetic conversion: (long) 13.63636334080342
Hello there,
I’m facing the following error while resetting the navigation to Home after a successful login.
The app crashes as soon as the navigation resets.
I’m able to reproduce the crash on a ...
0
votes
2
answers
380
views
Back Button Closes the App Instead of Navigating to the Previous Screen on Android React Navigation
When pressing the back button on Android, the app closes unexpectedly instead of navigating to the previous screen.
Video demonstrating the issue
I have tested the issue by creating two separate apps ...
0
votes
0
answers
64
views
How to properly wait for reset navigation in react native (react-navigator 6)?
React Navigation: Component in Tab Navigator not unmounting properly after parent Stack Navigator reset
The Problem
I have a nested navigation structure with a Stack Navigator containing a Tab ...
0
votes
0
answers
33
views
Nested stack is not accessible in react-navigation/bottom-tabs
I am currently started working in a react native project which is running in react-native: 0.67.5. In there they have used a lot of packages and some are deprecated. I have changed most of them to new ...
0
votes
1
answer
135
views
linkTo no longer working in React Navigation 7
After updating to "@react-navigation/native": "^7.0.3", using linkTo from useLinkTo() isn't working as it used to in ReactNative.
My linking config is somewhat complex:
const ...
1
vote
0
answers
1k
views
Detect `history.back()` with Expo Router
With Expo Router, there are several ways to detect navigation changes (usePathname, state from Navigator, etc.).
For certain use cases it would be helpful to also be able to check if the navigation ...
3
votes
0
answers
590
views
react-navigation navigate function causing unhandled exception 'RCTComponentViewRegistry: Attempt to query unregistered component
I am receiving an event from a react native webview and in that event attempting to navigate to a different stack.
However the app crashes every time with the following
*** Terminating app due to ...
0
votes
1
answer
138
views
How to hide custom tab bar on specific stack/ screen in nested navigation?
My nav structure looks like this
App.js
<Stack.Navigator initialRouteName="Auth">
<Stack.Screen
name="Auth"
component={AuthLayout}
...
1
vote
1
answer
610
views
How to animate switching tabs using react navigation bottom tabs
I need to make simple slide animation when switching tabs without sharp twitching and i also need to refresh the tab to get effect from updated state
I tried two ways
First:
added unmountOnBlur: true;...
0
votes
1
answer
94
views
Properly add types for React Navigation Nested Stack v6
I'm migrating from react-navigation v5 to v6 I'm trying to add type checking and I encouraged a problem that couldn't find a solution from the docs
import { StackScreenProps } from '@react-...
0
votes
1
answer
441
views
The Correct Way to Type React Navigation Drawer
WHat's the correct way to type RNavigation, currently I am doing this on The App
export type DrawerNavigatorType = {
Store: unknown;
ImagesStudio: { images: string[] }; //
};
const Drawer = ...
0
votes
1
answer
880
views
Fade Out/In Animation React Navigation
I am developing a React Native application using REACT NAVIGATION V6. I would like to add a custom transition for my navigation: fade out the current screen -> fade in the new screen. Any help on ...
0
votes
1
answer
134
views
React Navigation: `useLinkProps` not generating correct link in browser
I am using react-navigation v6 and expo 49. Bundler for web is webpack.
I need help with react navigation. It is around how links are generated. I have created a linking config which has a config like
...
0
votes
0
answers
49
views
How to fix :Typeerror: (0 , _native.createnavigatorfactory) is not a function. React Native app
Whenever I run my react native app through expo go (iOS) it shows that app-bundling had completed, but a few seconds later it would show the error: typeerror: (0 , _native.createnavigatorfactory) is ...
1
vote
0
answers
726
views
How to open login url in browser inside app and pass value to react-native?
I am learning react-native, so pretty new to it. I am curious how to implement browser sign-in and then pass value to store in AsyncStorage.
As an example AWS Console app redirects to signin.aws....
-1
votes
2
answers
367
views
How can I share state between header and screen in react navigation?
I built a custom header for a screen in Drawer navigator because I need to add an Input on the Header, I need to access the value of the Input inside the screen but also the setState function because ...
0
votes
2
answers
613
views
React Navigation, How to reset screen or entire stack from totally different stack
const ListStack = createStackNavigator();
function ListPage() {
return (
<ListStack.Navigator screenOptions={{headerShown: false}}>
<ListStack.Screen name="List" ...
0
votes
1
answer
710
views
How show back button in screen component in react navigaton
I use my own header in React Navigation and according to the documentation there is such a description:
Custom header to use instead of the default header.
This accepts a function that returns a ...
0
votes
1
answer
288
views
How to override the back button / sipe functionality in React Native
I am trying to acheive overiding the back/swipe back functionality in react native.
If you land on a page and it has a param of previousScreen. Then this screen should be used to override the back ...
0
votes
1
answer
64
views
How to disable/hide drawer inside specific sub nested screens?
I have a React Native app navigation logic similar to this navigation structure (Drawer, Tab, Stack).
DrawerNavigator enclosing BottomTabNavigator enclosing StackNavigator.
I want to disable my left ...
-1
votes
2
answers
149
views
Why won't this react native header follow the style I've applied?
Please take a look at my online project I created in snack
https://snack.expo.dev/@sujono/7c4a2d?platform=android .
So in Role2.js I did set the values but the result isn't what i expected. This is so ...
0
votes
0
answers
438
views
How to cache Screens in React Navigation?
In React Navigation's StackNavigator, whenever I switch the current Screen, regardless of whether I've previously loaded the new Screen, it always reloads. This is not what I want; I want certain ...
0
votes
1
answer
169
views
React Navigation V.6 - Refetching data in a screen component only when back from other certain screens
I'm using React-Navigation V6 and I have 4 screens. 3 of them are accesible from the first through buttons,
In my first screen I have:
useEffect(() => {
if (navigation.isFocused()) {
...
0
votes
1
answer
604
views
navigation.dispatch SET_PARAMS was not handled by any navigator
I have 3 screens and I just want the last screen to modify the previous screen's params. Navigable like this:
Home -> Feature -> Settings
Home -> Feature has a data param, something like ...
0
votes
2
answers
184
views
On Android, react navigation won't navigate away if there's an ongoing request. How to fix this?
As titled.
Weird thing is that this doesn't happen on both Pixel simulator. Only on my OPPO phone.
If there's an ongoing request in the background, I can only scroll, but hitting back, opening modal, ...
0
votes
0
answers
166
views
React navigation headerRight not rendering
how can I render headerRight in React navigation? I have tried everything that is told in this tutorial: https://reactnavigation.org/docs/header-buttons/
Still not working/rendering on the screen.
...
3
votes
1
answer
766
views
How to adjust the screen animation speed of @react-navigation/material-top-tabs in react-navigation v6
I want to increase the animation speed. As I see in the documentation https://reactnavigation.org/docs/material-top-tab-navigator, there is no longer props like timingConfig or springConfig in react-...
2
votes
0
answers
33
views
Navigation from a stack screen to tab navigator with reset does not work
I have login screen and main screen. My main screen has Tab.Navigator. When i click on login button of login screen i want to navigate to main screen and remove all the previous routes which are ...
0
votes
1
answer
87
views
React navigation v6 does not navigate to a nested screen before viewing that screen
In a react-native (Expo managed and react-navigation v6) app I have a navigation structure as follows:
When I want to navigate from the PayWall screen to ListPage with navigation.navigate('ListPage') ...
0
votes
1
answer
28
views
Tab Navigation bottom Icon as per selection
I want to make custom tab navigation icon as per below
So i make code like below
const Tab = createBottomTabNavigator();
function TabNavigationStack(props: any) {
return (
<Tab.Navigator
...
0
votes
0
answers
293
views
How to listen only for push and pop events (and nothing else) in React Navigation?
I need some custom animation/transition logic that I want to drive when React Navigation native stack navigator pushes or pops a screen, however, I'm stuck as I can't reliable detect only push and pop ...
0
votes
1
answer
343
views
React Navigation v6 - Nested Tab Stack navigation and back
I have a navigation structure set up as below:
Tab 1
Screen 1 (Initial Page)
Screen 2
Tab 2
Screen 3 (Initial Page)
Screen 4
Scenario:
There will be cases when Screen 1 has to directly navigate to ...
0
votes
1
answer
293
views
While navigating between screens, how to animate a screen from bottom-to-top in react native in Android?
When navigating between screens change the animation to animate from bottom-to-top rather than right to left.
<Stack.Screen
name="OfferDetails"
options={{headerShown: ...
1
vote
1
answer
432
views
React Navigation - Border Top Radius is added when going back from modal screen
I am using React Navigation on my expo application.
I have a "Categories list" Screen and an "Add Category" Screen that is set on the presentation modal option.
In the Categories ...
3
votes
1
answer
1k
views
React Native - How to handle error The action 'NAVIGATE' with payload .. was not handled by any navigator?
Im trying to handle the error
The action 'NAVIGATE' with payload .. was not handled by any navigator
tried having a no route match. the documentation says:
const config = {
screens: {
Home: {
...
0
votes
1
answer
65
views
navigation.navigate() from @react-navigation/native refreshes page
I am using useNavigation() from @react-navigation/native
My code would be like
const navigation = useNavigation();
navigation.navigate('Home');
And the weird thing is navigate() refreshes the page in ...
1
vote
1
answer
716
views
Passing props to react navigation drawer custom header
How can I pass arguments to the following custom react navigation drawer header 'NavHeader'? I want to include an icon inside the NavHeader that uses the following: navigation.dispatch(DrawerActions....
0
votes
0
answers
571
views
React Navigation v6, prevent popping screen when navigating to a previous screen
I'm using React Navigation v6 for React Native, consider the following navigation routes state:
1: {key: 'ClubScreen-PVQtJb1EkSv6q_wqPYpAi', name: 'ClubScreen', path: undefined, params: {…}}
2: {key: '...
2
votes
1
answer
518
views
React Navigation 6 - Header Title moves to opposite direction as Screen. Why?
I changed the direction the screen moves to move from left to right. However, while the screen moves from left-right, the header title moves still from right to left which looks of course weird. Is ...
1
vote
2
answers
573
views
iOS App Crashes when Navigating after popToTop()
On iOS, the app crashes when executing navigate("Screen1") after the execution of popToTop(). The app works perfectly fine on Android.
props.navigation.popToTop();
props.navigation.navigate(...
2
votes
0
answers
522
views
React Navigation DeepLinks not working in iOS with AppDelegate.swift
In my React Native app, I had to migrate its AppDelegate from Objective-C to Swift. After the migration, deeplinks stopped working: when a link is used, the app opens but it does not navigate to the ...
0
votes
1
answer
741
views
Console error regarding linking for React Navigation
I have an issue with deep linking using React Native, React Navigation on IOS. The error doesn't show up on Android. When I start the app I get a console error saying:
Looks like you have configured ...
0
votes
1
answer
63
views
React Navigation v6: How do you pass arbitrary props to Tab Navigator?
I have the following Tab Navigator in my React Native app, using React Navigation v6:
<Tab.Navigator>
<Tab.Screen name="Screen1" component={Screen1}/>
<Tab.Screen name=&...
1
vote
1
answer
2k
views
React Navigation v6: How to detect when screen comes into or out of focus?
In React Navigation v4, you could wrap your component in withNavigationFocus() and then trigger a function using
componentDidUpdate(prevProps) {
if (!prevProps.isFocused && this.props....
0
votes
0
answers
331
views
How to style the bottom OS navigation bar in React Native / Expo?
Sorry if the title wasn't very clear.
I'm using react navigation in an expo RN app.
Im not sure what this is called but Im referring to the bottom, OS gesture navigation here:
The background is all ...
1
vote
2
answers
3k
views
React Navigation v6: best way to pass additional props to screen?
In the docs for React Navigation v6, in the Passing Additional Props section it says Sometimes we might want to pass additional props to a screen. We can do that with 2 approaches and the first ...
2
votes
2
answers
4k
views
React Native - Detect first time app launch
I am using React navigation v6 for my react native application. I am stuck at trying to detect if the app is launched for the first time by the user or not.
I have tried to set FIRST_LAUNCH through ...
0
votes
1
answer
613
views
Hide Drawer navigator hamburger icon on certain screens
NOTE: Do guide me if there is something missing.
I have a Drawer Navigator which contains Drawer Screens that are Stack Screens like:
<PaperProvider theme={theme}>
<...
1
vote
0
answers
266
views
GO_BACK on react navigation nested is not work
Im using react native v63 and react navigation v6.
I have 3 Bottom tab screen and 2 other screen
Tab screens :
home
category
profile/singin
Stack screens :
splash
detail
When I navigated on tab ...