I am working on a mobile app and need your help. I want to hide bottom tab bar in "auth" route name. I have tried several methods from stackoverflow and google but it didn't work. My Code:
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {View} from 'react-native';
import Auth from './views/Auth';
import AuthState from './context/auth/AuthState';
import {NavigationContainer} from '@react-navigation/native';
import {createMaterialBottomTabNavigator} from '@react-navigation/material-bottom-tabs';
import Home from './views/Home';
const Tab = createMaterialBottomTabNavigator();
const App = () => {
return (
<AuthState>
<NavigationContainer>
<Tab.Navigator initialRouteName="auth">
<Tab.Screen name="auth" component={Auth} />
<Tab.Screen name="home" component={Home} />
</Tab.Navigator>
</NavigationContainer>
</AuthState>
);
};
export default App;