React async sorunu

return (dispatch) => {
    fetch(url, requestOptions)
      .then((response) => response.json())
      .then((result) =>
        dispatch(getCustomerSuccess(result), sessionStorage.setItem("test", 1))
      )
      .catch((error) => console.log("error", error));
  };

Arkadaşlar böyle bir kodum var burada aldığım hata:

Uncaught Error: Actions must be plain objects. Instead, the actual type was: ‘function’. You may need to add middleware to your store setup to handle dispatching other values, such as ‘redux-thunk’ to handle dispatching functions

Bunu nasıl çözebilirim