rsnext/examples/with-apollo-and-redux-saga/lib/clock/sagas.js
Corbin Crutchley 1d66da15a1 with apollo and redux saga example: Update deps (#6734)
* with apollo and redux saga example: Update deps

* Fix linting problems
2019-03-27 16:00:57 -05:00

17 lines
370 B
JavaScript

import { delay, call, put, take } from 'redux-saga/effects'
import { polyfill } from 'es6-promise'
import 'isomorphic-unfetch'
import { actionTypes, tickClock } from './actions'
polyfill()
function * runClockSaga () {
yield take(actionTypes.START_CLOCK)
while (true) {
yield put(tickClock(false))
yield delay(800)
}
}
export default call(runClockSaga)