1. Home
  2. Docs
  3. REACT
  4. DRAFT
  5. async – await

async – await

const effects = (dispatch) => ({
    async incrementAsync(payload) {
      await new Promise((resolve) => setTimeout(resolve, 1000));
      dispatch.count.increment(payload);
    }
})