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

230
Vistas
How can I use Drawer Navigation in TabScrren in React native?

I have a MainPage component, and in the MainPage component, there are PostList, Post, and Explain components as Stack.Screen. and i made Home component

this is my code

    const home = () => {
      return (
        <View>
        <Text>home</Text>
    </View>
        )
    }

    const MainPage = () => {
      return (
        <Stack.Navigator>
          <Stack.Screen
            name="PostList"
            component={PostList}
            options={{headerShown: false}}
          />
          <Stack.Screen
            name="Post"
            component={Post}
            options={{headerShown: false}}
          />
          <Stack.Screen
            name="Explain"
            component={Explain}
            options={{
              headerShown: false,
            }}
          />
        </Stack.Navigator>
      );
    };

And MainPage is wrapped with Tab.screen.

    <Tab.Navigator>
    <Tab.Screen
      name="MainPage"
      component={MainPage}
      options={{
        headerShown: false,
        tabBarStyle: {display: 'none'},

        tabBarIcon: ({color}) => (
          <FontAwesome5 name="list" size={20} style={{color}} />
        ),
        tabBarActiveTintColor: 'blue',
      }}
    />
    </Tab.Navigator>

I want to navigate to Home component using drawer navigation in MainPage component inside Tab.Screen.

so i tried like this code

    <Drawer.Navigator initialRouteName="Home">
    <Tab.Navigator>
    <Tab.Screen
      name="MainPage"
      component={MainPage}
      options={{
        headerShown: false,
      }}
    />
    </Tab.Navigator>
    </Drawer.Navigator>

but it doesn't work. How can i fix my code?

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