title: I use action to send a request and return the result to reducer, but store can't receive the result
body: <p>when componentDidMount i dispatch an action to send a request, this is the action code below. receiveUserInfo just return data to reducer</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export function requestUserInfo() {
    return dispatch =&gt; {
      dispatch(getUserInfo())
      return axios.post('/user/getScores', qs.stringify({
          token: token,
          uid: uid
        }))
        .then(res =&gt; {
          if (res.data.status !== 200) {
            message.error(res.data.message)
            return state
          }
          // return the data from server
          return { ...res.data.attachment}
        })
        .then(data =&gt; {
          // receiveUserInfo just return action and data
          dispatch(receiveUserInfo(data))
        })
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is the reducer code.
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const token = localStorage.getItem('token')
  const uid = localStorage.getItem('uid')
  
  export const requestUserInfo = (state = {}, action) =&gt; {
    switch (action.type) {
      case 'HEADER_GET_USERINFO':
      case 'HEADER_RECEIVE_USERINFO':
        return Object.assign({}, state, action.data)
        break
      default:
        return state
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function receiveUserInfo(data) {
    return {
      type: 'HEADER_RECEIVE_USERINFO',
      data
    }
  }</code></pre>
  </div>
  </div>
  </p>