redux-devtools/extension/examples/saga-counter/src/sagas/index.js
Nathan Bierema 6782f4ae41
chore(extension): add extension (#658)
* Move extension

* prettier
2020-10-26 08:18:23 -04:00

15 lines
366 B
JavaScript

/* eslint-disable no-constant-condition */
import { takeEvery } from 'redux-saga';
import { put, call } from 'redux-saga/effects';
import { delay } from 'redux-saga';
export function* incrementAsync() {
yield call(delay, 1000);
yield put({ type: 'INCREMENT' });
}
export default function* rootSaga() {
yield* takeEvery('INCREMENT_ASYNC', incrementAsync);
}