title: Redux-thunk - dispatch is not a function
body: <p></p>
  
  <p>I'm having trouble with redux-thunk. It's saying dispatch is not a function inside my action creator, I tried consoling the returned arguments and there is none.</p>
  
  <p>Here goes the code:</p>
  
  <p><strong>Action</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>export function signUp(data) {
    return dispatch =&gt; {
      console.log(dispatch)
      if (data.email === 'email@server.com') {
        dispatch(signIn(data, () =&gt; {
          if (data.type === '2') {
            browserHistory.push('/settings/profile')
          } else {
            browserHistory.push('/')
          }
        }))
      } else {
        return {
          type: ActionTypes.USER_SIGN_UP__ERROR
        }
      }
    }
  }`
  </code></pre>
  
  <p><strong>mapActionsToProps</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>const mapActionsToProps = dispatch =&gt; ({
    signUp (data) {
      console.log(dispatch)
      dispatch(userActions.signUp(data))
    }
  })
  </code></pre>
  
  <p>By the way, you can see I consoled the dispatch function inside the mapActionsToProps, and it is returning as it was supposed to:</p>
  
  <pre class="lang-js prettyprint-override"><code>  function (action) {
      if (typeof action === 'function') {
        return action(dispatch, getState, extraArgument);
      }
  
      return next(action);
    }
  </code></pre>