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

189
Views
React Native tabnavigation in seperate component?

I'm trying to make a RN-app, but I dont want to show the navigation on every screen. For example the registration and login screen shouldn't show the navigation. So I wanted to put the navigation in a component and import that component into the screens that should show it. I'm not sure if that works with navigation but I couldn't find anything saying that it won't work. I could be doing completely wrong.

The component I tried to create:

import React, { Component } from 'react'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';

const Tab = createBottomTabNavigator();

class Navigation extends Component {
    render() {
        <Tab.Navigator>
            <Tab.Screen name="Home" component={}/>
            <Tab.Screen name="Explore" component={}/>
            <Tab.Screen name="Account" component={}/>
        </Tab.Navigator>
    }
}

export default Navigation;

The way I wanted to import the component:

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { Navigation } from './components';

export default function App() {
  return (
    <View style={styles.container}>
      <Navigation/>
    </View>
  );
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I ever had the same issue. And this react navigation documentation is very helpful. Please check here https://reactnavigation.org/docs/auth-flow/

If you just want keep the navigation and just need to hide the tab bar please read this one https://reactnavigation.org/docs/hiding-tabbar-in-screens

about 4 years ago · Juan Pablo Isaza Report
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!