📜  redux saga 延迟 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:16.481000             🧑  作者: Mango

代码示例1
const delay = (ms) => new Promise(res => setTimeout(res, ms))


export function* incrementAsync() {
  yield delay(1000)
  yield put({type: 'INCREMENT'})
}