React Native - How to Redirect to a login view from componentWillReceiveProps
<p>I am trying to detect if a user is logged in during an application start and redirect him to a login screen if not logged in.</p>

<pre><code>import * as AuthView from '../modules/auth/AuthView';    
const AppView = React.createClass({
    propTypes: {
        isReady: PropTypes.bool.isRequired,
        isLoggedIn: PropTypes.bool.isRequired,
        dispatch: PropTypes.func.isRequired
    },
    componentDidMount() {
        snapshotUtil.resetSnapshot()
            .then(snapshot =&gt; {
                const {dispatch} = this.props;

                if (snapshot) {
                    dispatch(SessionStateActions.resetSessionStateFromSnapshot(snapshot));
                } else {
                    dispatch(SessionStateActions.initializeSessionState());
                }

                store.subscribe(() =&gt; {
                    snapshotUtil.saveSnapshot(store.getState());
                });
            });
    },

    componentWillReceiveProps({isReady, isLoggedIn}) {
        if (!this.props.isReady) {
            if (isReady &amp;&amp; !isLoggedIn) {
                console.warn("Not logged in, trying to show login screen here...");
               AuthView.showLoginView();
            }
        }
    },

    render() {
        if (!this.props.isReady) {
            return (
                &lt;View&gt;
                    &lt;ActivityIndicator style={styles.centered}/&gt;
                &lt;/View&gt;
            );
        }
        return (
            &lt;View style={{flex: 1}}&gt;
                &lt;NavigationViewContainer /&gt;
            &lt;/View&gt;
        );
    }
});
</code></pre>

<p>And my AuthView Looks like this:</p>

<pre><code>export function showLoginView() {
    var loginView = &lt;View&gt;
        &lt;Text&gt;
            This is a Login View
        &lt;/Text&gt;
    &lt;/View&gt;;

    return loginView;
}
</code></pre>

<p>The output is blank . looks like this : <a href="http://i.imgur.com/6CgvOGW.png" rel="nofollow">http://i.imgur.com/6CgvOGW.png</a></p>

<p>So it is showing the warning message ( console.warn ) and showing the "ActivityIndicator" . But not a Login Panel.</p>

<p>My question is, how to I modify the showLoginView() function to show a full screen login view?</p>