Skip to content

Instantly share code, notes, and snippets.

@vahidvdn
Created January 6, 2022 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vahidvdn/16bb8f70714514403b194a7a44a1d1a1 to your computer and use it in GitHub Desktop.
Save vahidvdn/16bb8f70714514403b194a7a44a1d1a1 to your computer and use it in GitHub Desktop.
import { delay } from 'redux-saga';
import { takeEvery, put } from 'redux-saga/effects';
function* ageUpAsync() {
yield delay(4000);
yield put({ type: 'AGE_UP_ASYNC', value: 1 })
}
export function* watchAgeUp() {
yield takeEvery('AGE_UP', ageUpAsync);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment