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

227
Views
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
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!