I'm currently using React Native Navigation to power navigation in a react native application.
For the purposes of explaining the problem, I have two screens, one for the homepage, and one for the Search Screen, for the search screen, there are navigational elements left to right that allow you to move further through the app. For the home screen, think of it as a splash screen that doesn't need the navigational elements. There are two buttons on it that allow the user to move through the app.
Now. My problem is this. On the home screen, navigation is hidden.
HomeScreen.options = {
bottomTabs: {
visible: false
},
topBar: {
visible: false
}
}
In my definition of the Bottom Tabs, the home page is a child entry, without any options. In this scenario, it appears that doing this, creates an additional entry in the bottom tab, which I don't want to appear. i.e. the Home Child, should not have an associated icon in the bottom nav on the search screen. Am I missing something? Is there an easy way to remove a 'bottom tab' but still have it sitting in the same structure? Or is there a better way to do this?
I did try having multiple navigators, however, this didn't seem to play ball either.
const BOTTOM_TABS: LayoutBottomTabs = {
id: 'BOTTOM_TABS',
children: [
{
stack: {
id: 'HOME_TAB',
children: [
{
component: {
id: 'HOME_SCREEN',
name: 'HomeScreen',
}
}
],
},
},
{
stack: {
id: 'SEARCH_TAB',
children: [
{
component: {
id: 'SEARCH_SCREEN',
name: 'SearchScreen',
}
}
],
options: {
bottomTab: {
text: 'Search',
icon: require('@resource/icons/tabs/search.png'),
...tabConfig,
},
},
},
},
],
};
export default BOTTOM_TABS
Navigation.setRoot({
root: {
bottomTabs: BOTTOM_TABS,
options: {
statusBar: {
backgroundColor: DARK_ORANGE,
style: 'light',
},
},
},