Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

96
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda