Я хочу перейти к стековому навигатору из BottomTabNavigator. Но когда я назначаю стековый навигатор внутри BottomTabNavigator, появляется ошибка The component for route 'route_name' must be a React component
.
Вот мой код:
const BottomTabNavigator = createAppContainer(createBottomTabNavigator(
{
Home: {
screen: HomeScreen,
navigationOptions:{
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor }) => (
<View>
<Icon style={[{color: tintColor}]} size={25} name={'ios-home'}/>
</View>)
}
},
Profile: {
screen: ProfileStackNavigator,
navigationOptions:({ navigation }) => ({
tabBarLabel: 'Profile',
tabBarIcon: ({ tintColor }) => (
<View>
<Icon style={[{color: tintColor}]} size={25} name={'ios-contact'}/>
</View>),
}),
},
},
{
tabBarOptions: {
activeTintColor: '#2383F7',
// inactiveTintColor: 'gray',
},
}
));
const ProfileStackNavigator = createAppContainer(createStackNavigator({
ProfileHome:
{
screen: ProfileScreen,
// headerMode: 'none',
navigationOptions:
{
header: null,
}
},
ChangePasswordFromProfile:
{
screen: ChangePasswordScreen,
// navigationOptions:
// {
// header: null,
// }
}
}))
Здесь представлены все версии навигации:
«реакция-навигация»: «^ 4.0.10», «реакция-навигация-ящик»: «^ 2.3.3», «реакция-навигация-стек» : "^ 1.10.3", "реакции-навигационные вкладки": "^ 2.6.2"
Заранее спасибо