@textile/redux-saga-wait-for

Provides a waitFor select redux saga effect

Usage no npm install needed!

<script type="module">
  import textileReduxSagaWaitFor from 'https://cdn.skypack.dev/@textile/redux-saga-wait-for';
</script>

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')
  }
}