title: Redux Thunk action creator not dispatching fetching api
body: <p>I have created a small react-redux application to fetch api data with redux-thunk middleware, for some reason, the action creator function that returns dispatch is not working.</p>
  
  <p><strong>Action Creators:</strong></p>
  
  <pre><code>export const fetchUsers = () =&gt; {
    console.log('test 1');
    return dispatch =&gt; {
      console.log('test 2');
      dispatch(fetchUserRequest);
      axios
        .get("https://jsonplaceholder.typicode.com/users")
        .then(response =&gt; {
          const users = response.data;
          dispatch(fetchUserSuccess(users));
        })
        .catch(error =&gt; {
          const errorMessage = error.message;
          dispatch(fetchUsersFailure(errorMessage));
        });
    };
  };
  </code></pre>
  
  <p><code>console.log('test 1')</code> is working but <code>console.log('test 2')</code> is not working.
  Here is <a href="https://codesandbox.io/s/react-redux-hooks-ykmnc" rel="nofollow noreferrer">codesanbox</a> link</p>