title: Can't rename response in redux action
body: <p>I want to rename response in <code>.then(...</code> because it's called the same as parameter,  but getting </p>
  
  <pre><code>[1] ./src/actions/postsActions.js
  [1]   Line 95:  'e' is not defined  no-undef
  </code></pre>
  
  <p>The problem is that it <code>dispatches action</code> that show the message, and it takes <code>addPost</code> parameter data as <code>showMessage</code> parameter, and there is no message property in it..</p>
  
  <p>Example: </p>
  
  <pre><code>export const addPost = data =&gt; dispatch =&gt; {
    dispatch({
      type: ADD_POST
    });
    fetch(API_URL + "/posts", {
      method: "POST",
      body: JSON.stringify(data),
      headers: {
        "Content-Type": "application/json",
        Authorization: JSON.parse(localStorage.getItem("token")),
        "Access-Control-Allow-Origin": "*"
      }
    })
      .then(res =&gt; res.json())
      .then(
        e =&gt;
          dispatch({
            type: ADD_POST_SUCCESS,
            payload: e
          }),
        dispatch(showMessage(e)),
        setTimeout(() =&gt; {
          history.push("/");
          dispatch({ type: CLEAR_MESSAGE });
        }, 2000)
      )
      .catch(err =&gt;
        dispatch({
          type: ADD_POST_FAILED,
          payload: err
        })
      );
  };
  </code></pre>