Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

88
Views
React Native Web navigation route issue

I'm building a RN App and also building it for web with RNWeb, but I'm encountering two issues.

First, I need to get rid of some of the names in the route of the url, for example:

In my App.js I have a <NavigationContainer> In which I have a StackNavigator that goes to a screen called Main. In the Main screen, I have a tab navigator with 5 different tab screens. Each of that Screen, is a different StackNavigator that holds multiple StackScreens depending on the context of the TabNavigator Screen (Ex: Settings on tab navigator will hold the StackSettings.Navigator and inside that will reside AppSettings screen component. But the problem is, they show up in the url, for example: http://app.com/StackSettings/AppSettings instead of http://app.com/AppSettings or http://app.com/StackHome/Home instead of http://app.com/Home

TLDR: I have stacked navigations inside each tab navigation and url shows like this: http://app.com/StackNavigatorName/StackScreenName instead of http://app.com/StackScreenName

And the 2nd issue I'm encountering, if I go to another Tab Navigator(therefore another StackNavigator) and go back to the old one(use back or choose it from tab nav) I cannot click on anything on it.

Code:

App.js

 <NavigationContainer linking={{
            prefixes: ["localhost"],
            config:{
              screens:{
                Main: {
                  path: '/',
                },
              },
            },
          }}
        >
        
          <Stack.Navigator initialRouteName="Main" >
            <Stack.Screen name="Main" component"Main">
          </Stack.Navigator>
</NavigationContainer>
        

Main.js

const StackNavigatorHome = () => (
    <StackHome.Navigator initialRoute="Home">
            <StackHome.Screen name="Home" component={Home}/>
            <StackHome.Screen name="Create" component={Create}/>
    </StackHome.Navigator>
)


const StackNavigatorSettings = () => (
    <StackSettings.Navigator initialRoute="Settings">
            <StackSettings.Screen name="Settings" component={Settings}/>
            <StackSettings.Screen name="AppSettings" component={AppSettings}/>
    </StackSettings.Navigator>
)

return(
<Tab.Navigator >
    <Tab.Screen name="StackHome" component={StackNavigatorHome} />
    <Tab.Screen name="StackSettings" component={StackNavigatorSettings} />
</Tab.Navigator>
)
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!