刷新路由器反应导航

时间:2017-08-24 14:33:26

标签: javascript reactjs react-native react-router react-navigation

我有带有条件渲染的路由器。

    const {
        checkedSignIn,
        isSignedIn,

        redirectTo
    } = this.props.screenProps;

    const navigation = this.props.navigation;

    if (isSignedIn) {
        const obj = Object.assign({}, this.props, this.props.screenProps);
        return (
            <DashboardTabComponent
                 //navigation={navigation}
                //  screenProps={this.props.screenProps}
                screenProps={obj}
            />
        );
    } else {
        return (
            <HomeScreen
                 navigation={navigation}
                 screenProps={this.props.screenProps}
            />
        );
    }

内部&#39; DashboardTabComponent&#39;在其中一个选项卡中有按钮,当我按下退出按钮时,它应重新渲染此组件,以便它可以显示主屏幕。

0 个答案:

没有答案
相关问题