title: React navigation to navigate from redux action file
body: <p>I want to navigate from my reduc action file.
  1st screen is login so after click on login button will call a redux action creator and reducer generate a new state. So, after the action i want to rediret to my dashboard.</p>
  
  <p>I am using </p>
  
  <p><strong>react native + redux + react navigation</strong></p>
  
  <p>Login component file (<strong>LoginCmp.js</strong>):
  </p>
  
  <pre class="lang-jsx prettyprint-override"><code>import React, { Component } from 'react';
  import {
    Text,
    View,
    ScrollView,
    KeyboardAvoidingView
  } from 'react-native';
  import { connect } from 'react-redux';
  import { fieldChange, LoginAction } from '../../actions';
  import { Button, Section, Input, Alert } from '../Helpers';
  
  LoginAction(){
    const payload = {
      email: this.props.email,
      password: this.props.password
    };
    this.props.LoginAction(payload); // Action call
  }
  
  
  render() {
      return (
        &lt;KeyboardAvoidingView
      style={styles.container}
      behavior="padding"
        &gt;
        &lt;View&gt;
      &lt;ScrollView contentContainerStyle={styles.contentContainer}&gt;
        &lt;Text style={styles.headerText}&gt; Login &lt;/Text&gt;
        {this.alertMessage()}
        &lt;Section&gt;
          &lt;Input
            placeholder="email@gmail.com"
            onChangeText={this.onFieldChange.bind(this, { actionType: 'EMAIL_CHANGED' })}
            value={this.props.email}
          /&gt;
        &lt;/Section&gt;
        &lt;Section&gt;
          &lt;Input
            secureTextEntry
            placeholder="Password"
            onChangeText={this.onFieldChange.bind(this, { actionType: 'PASSWORD_CHANGED' })}
            value={this.props.password}
          /&gt;
        &lt;/Section&gt;
        &lt;Section&gt;
          &lt;Button
            onPress={this.LoginAction.bind(this)}
            style={styles.buttonLogin}
          &gt;
            Submit
          &lt;/Button&gt;
        &lt;/Section&gt;
      &lt;/ScrollView&gt;
        &lt;/View&gt;
        &lt;/KeyboardAvoidingView&gt;
      );
    }
  }
  
  const mapStateToProps = ({ auth }) =&gt; {
    console.log(auth);
    return auth;
  };
  
  export default connect(mapStateToProps, { fieldChange, LoginAction })(LoginCmp);
  </code></pre>
  
  <p>Router file (<strong>Router.js</strong>):</p>
  
  <pre class="lang-jsx prettyprint-override"><code>const RouterComponent = StackNavigator({
    login: { screen: LoginCmp },
    dashboard: { screen: DashboardCmp },
  });
  </code></pre>
  
  <p>Action creator file (<strong>AuthActions.js</strong>):</p>
  
  <pre class="lang-jsx prettyprint-override"><code>import firebase from 'firebase';
  import { NavigationActions } from 'react-navigation';
  
  
  // Login actions
  export const LoginAction = (payload) =&gt; {
    return (dispatch) =&gt; {
      firebase.auth().signInWithEmailAndPassword(payload.email, payload.password)
        .then(user =&gt; loginSuccess(dispatch, user))
        .catch((error) =&gt; {
      loginFail(dispatch, error);
      });
    };
  };
  
  // Login success function
  
  logoutSuccess = (dispatch, user) =&gt; {
  // dispatch an action
  dispatch({
    type: 'LOGOUT_SUCCESS',
    payload: user
  });  
  ### From here i want to navigate to dashboard.
  };
  </code></pre>