React native 反应导航选项卡导航器仅渲染第一个选项卡

React native 反应导航选项卡导航器仅渲染第一个选项卡,react-native,react-navigation,react-native-ios,React Native,React Navigation,React Native Ios,我正在开发react本机应用程序,我正在使用TabNavigator(react navigation)和两个包含登录屏幕的简单选项卡(两个选项卡具有相同的屏幕)。第一个选项卡始终显示,但第二个选项卡不会显示 我看不出有错误。 我在ios模拟器上运行它(iPhoneX,iOS11) const LoginStack=StackNavigator({ 登录:{ 屏幕:签名, 导航选项:{ 标题:“登录”//strings('screens.Sign.title'), }, }, }, { head

我正在开发react本机应用程序,我正在使用TabNavigator(react navigation)和两个包含登录屏幕的简单选项卡(两个选项卡具有相同的屏幕)。第一个选项卡始终显示,但第二个选项卡不会显示

我看不出有错误。 我在ios模拟器上运行它(iPhoneX,iOS11)

const LoginStack=StackNavigator({
登录:{
屏幕:签名,
导航选项:{
标题:“登录”//strings('screens.Sign.title'),
},
},
}, {
headerMode:'屏幕',
});
导出常量SignedInTabs=TabNavigator
订单:{
屏幕:LoginStack,//OrdersStack,
导航选项:{
tabBarLabel:'login',//strings('tabs.Orders'),
tabBarIcon:({tintColor})=>(),
},
},
账户:{
屏幕:LoginStack,
导航选项:{
tabBarLabel:'login',//strings('tabs.Account'),
tabBarIcon:({tintColor})=>(),
},
},
}, {
tabBarPosition:'底部',
tabBarComponent:TabBarBottom,
选项卡选项:{
activeTintColor:“#FFF”,
activeBackgroundColor:colors.primaryTheme
},
});
react本机版本:0.51.0

反应导航版本:1.0.0-beta.27

节点版本:6.11.0

npm版本:3.10.10

编辑(5月26日至18日):


robvolk评论解决了我的问题。

我也遇到了同样的问题。它看起来像是最新的react导航版本的一个bug?根据这条线索()降级以作出反应-navigation@1.0.3这将解决问题。我降级并成功修复了该问题


这一次我连续两天都在扯头发。

你有什么收获吗?降级对我没有帮助:(
const LoginStack = StackNavigator({
    Login: {
        screen: SignIn,
        navigationOptions: {
            title: 'Sign In' //strings('screens.SignIn.title'),
        },
    },
}, {
 headerMode: 'screen',
});

export const SignedInTabs = TabNavigator
  Orders: {
      screen: LoginStack, //OrdersStack,
        navigationOptions: {
            tabBarLabel: 'login', //strings('tabs.Orders'),
            tabBarIcon: ({tintColor}) => ( <Icon name = "list" color = {tintColor} size = {28} />),
        },
  },
  Account: {
        screen: LoginStack,
        navigationOptions: {
            tabBarLabel: 'login', //strings('tabs.Account'),
            tabBarIcon: ({tintColor}) => ( <Icon name = "account-circle" color = {tintColor} size = {28} />),
        },
  },
 }, {
    tabBarPosition: 'bottom',
    tabBarComponent: TabBarBottom,
    tabBarOptions: {
        activeTintColor: '#FFF',
        activeBackgroundColor: colors.primaryTheme
    },
});