How to use the redux-loop.Effects function in redux-loop

To help you get started, we’ve selected a few redux-loop examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github root-systems / feathers-action / src / reducer.js View on Github external
const service = payload.service
  const method = payload.method
  const args = payload.args

  const cid = createCid()
  const startPayload = callArgs[method].apply(null, args)
  const startAction = methodActions.start(cid, startPayload)

  console.log('state', state)
  console.log('action', action)
  console.log('next state', startReducer(state, startAction))

  return Loop.loop(
    startReducer(state, startAction),
    Loop.Effects.promise(callEffect, methodActions, cid, payload)
  )
}