score:4

Accepted answer
then(e => {

      dispatch({type: ADD_POST_SUCCESS, payload: e});
      dispatch(showMessage(e));
      setTimeout(() => {
        history.push("/");
        dispatch({type: CLEAR_MESSAGE});
      }, 2000);

    });

score:1

Promise.resolve(1)
.then(e => {
  console.log('1. ' + e); // first function
  return e;
})
.then(e => {
  console.log('2. ' + e); // second function
  return e;
})

Related Query

More Query from same tag