I'm trying to create a screen that has two navigators in it where screen is a stack navigator, and on the same screen is a tab navigator nested in it whose contents are visible on 3/5 of the screen. This is my current configuration
const HomeStack = () => {
return (
<Stack.Navigator initialRouteName="Home" headerMode="none">
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="ServiceConfig" component={ServiceConfig}/>
</Stack.Navigator>
);
}
App.js
<View style={{flex: 1}}>
<HomeTabView />
</View>
HomeScreen.js
export default function HomeTabView() {
return (
<TopTab.Navigator
initialRouteName="Recommended"
initialLayout={{width: Dimensions.get('window').width}}>
<TopTab.Screen name="Recommended" component={ListServices} />
<TopTab.Screen name="Recent" component={ListServices} />
</TopTab.Navigator>
);
}
HomeTabView.js
It should be work in following way
And your tab view should be like:
And
ListServices
can be the part ofHomeScreen
And your app code should be like :