title: Redux - Resolve a Promise after calling dispatch action in component
body: <p>I have an 'addToFolder' action which dispatches an action that is handled in my Redux reducer.</p>
  
  <pre><code>export function addToFolder(folderIds, contentId, contentType) {
    const item = {};
    item.folder_ids = folderIds;
    item.content_id = contentId;
    item.content_type = contentType;
  
    return function(dispatch) {
      return fetch(`${getAPIPath}api/addtofolder`, {
        method: 'PUT',
        body: JSON.stringify(item),
        credentials: 'include',
        headers: {
          Accept: 'application/json',
        },
      })
      .then((response) =&gt; {
        response.json().then((res) =&gt; {
          dispatch(addToFolderSuccess(res.data));
        });
      }).catch((error) =&gt; {
        throw (error);
      });
    };
  }
  </code></pre>
  
  <p>In my component after clicking on my 'Add to Folders' button I dispatch the action. I would like to use <code>.then</code> to fire a snack/notification action, but use the response from my API call in order to fill in the id and message text displayed by the notification. Currently <code>response</code> is undefined.</p>
  
  <pre><code>addToFolder = () =&gt; {
      this.props.actions.addToFolder(this.state.activeItems, this.props.contentId, this.props.contentType)
        .then((response) =&gt; {
          this.setState({ addBtnLoading: false });
          this.props.actions.dispatch(showSnack(response.id, {
            label: response.message,
            timeout: 4000,
          }));
        });
    };
  </code></pre>