moringaman
2/10/2020 - 12:12 AM

React Async Action

export const sampleReducer = () => {
  return async (dispatch, getState) => {
    // get some async data using await
    return({
      type: 'TYPE_NAME',
      Payload: 'result from async data request'
    })
  }
}