fork
Redux effects support for non blocking async calls.
Installation
$ npm install fork
Usage
const store = createStorereducer {} { return 'foo'} store
API
fork(fn)
Action creator.
fn
- function, generator, or iterator to fork
Returns: a task
join(task)
Action creator.
task
- task to block on
Returns: result of task
cancel(task)
Action creator. Throws error in running task with message: 'TaskCanceled'.
task
- task to cancel
taskRunner(dispatch)
Runs tasks. Used internally by koax.
dispatch
- dispatch function
Returns: dispatch
task.isRunning()
Returns: whether task is running
task.result()
Returns: the result of the task
task.error()
Returns: the error thrown by the task
task.cancel()
Cancels task
License
MIT