@textile/redux-saga-wait-for
v1.0.1
Published
Provides a waitFor select redux saga effect
Downloads
2
Readme
redux-saga-wait-for
Getting started
$ npm install @textile/redux-saga-wait-for --save
Example
import { waitFor } from 'redux-saga-wait-for'
function * waitForOnline() {
const { onlineTimout } = yield race({
online: waitFor(select(TextileNodeSelectors.online)),
onlineTimout: call(delay, 10000)
})
if (onlineTimout) {
throw new Error('node online timed out, internet connection needed')
}
}