Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux saga delay

const delay = (ms) => new Promise(res => setTimeout(res, ms))


export function* incrementAsync() {
  yield delay(1000)
  yield put({type: 'INCREMENT'})
}
 
PREVIOUS NEXT
Tagged: #redux #saga #delay
ADD COMMENT
Topic
Name
3+2 =