title: Call function after dispatch from redux has finished
body: <p>All around it but not quite as I have enough of an idea of <code>redux-thunk</code> and of <code>react-router</code> but I am not getting this seemingly simple idea of:</p>
  
  <p>Call a change in route programmatically via <code>&lt;Route/&gt;</code>'s <code>history.push('/')</code> after an action has finished dispatching to the store, this to happen when a button is pushed.</p>
  
  <pre><code>const LoggerRedux = ({stateProp, LogIn}) =&gt; {
      return(
        &lt;div&gt;
          &lt;h2&gt;Here is the button. Use this to login&lt;/h2&gt;
          &lt;Route render={({ history}) =&gt; (
            &lt;button
              type='button'
              onClick={
  
              //Something that calls {LogIn}
              //and then the history.push('/')
  
              }
              &gt;
              Log yo Arse Inn
            &lt;/button&gt;
          )}&gt;
  
          &lt;/Route&gt;
        &lt;/div&gt;
      )
  }
  
  const mapStateToProps = (state) =&gt; {
    return {
      stateProp : state
    }
  }
  const mapDispatchToProps = (dispatch) =&gt; {
    return {
      LogIn : () =&gt; dispatch({
        type : 'AUTHENTICATE'
      }),
      LogOut : (bool) =&gt; dispatch({
        type : 'LOGGED_OUT',
        bool
      })
    }
  }
  const LoginConn = connect( mapStateToProps, mapDispatchToProps)(LoggerRedux);
  </code></pre>
  
  <p>Layman explanations and examples of all things I mentioned/tagged would also be nice</p>