title: Getting dispatch function return value
body: <p>I'm new to react. I tried to separate component and action function. but I cannot get return value from separate action function. Is it possible to return a value (e.g Object {}) from dispatch function</p>
  
  <p>I put the brief code as below : </p>
  
  <p>LoginComponent.js</p>
  
  <pre><code>class Login extends React.Component {
     constructor(props){
        super(props)
        this.state = {
           username : '',
           password : ''
        }
     }
     submit = (e) =&gt; {
        /* console.logging "Some response"*/
        console.log(this.props.doLogin(this.state))
     }
     render(){
        return (
           &lt;form onSubmit={this.submit}&gt;/* some login element */&lt;/form&gt;
        )
     }
  }
  
  export default connect(null, {LoginAction})(Login);
  </code></pre>
  
  <p>LoginAction.js</p>
  
  <pre><code>export function doLogin(state){
     return dispatch =&gt; {
        return axios.post('login', state).then(res =&gt;{
  
        return "Some response";
  
      })
     }
  }
  </code></pre>
  
  <p>but It doesn't return any value</p>
  
  <p>Thankyou.</p>