index.js
736 Bytes
// import { reducer as formReducer } from './uaa';
import { delay } from 'redux-saga';
import { put, takeEvery, all } from 'redux-saga/effects';
import reduxform from './reduxform';
import system from './system';
function* incrementAsync() {
yield delay(1000);
yield put({ type: 'INCREMENT' });
}
function* watchIncrementAsync() {
yield takeEvery('INCREMENT_ASYNC', incrementAsync);
}
function* helloSaga() {
yield 5;
console.log('Hello Sagas!');
}
// notice how we now only export the rootSaga
// single entry point to start all Sagas at once
export default function* createSagaRoot() {
yield all([
...reduxform,
...system,
helloSaga(),
watchIncrementAsync()
]);
}