Same as spawn([context, fn], ...args)
but supports passing a fn
as string.
Useful for invoking object's methods, i.e.
yield spawn([localStorage, 'getItem'], 'redux-saga')
Same as spawn([context, fn], ...args)
but supports passing context
and
fn
as properties of an object, i.e.
yield spawn({context: localStorage, fn: localStorage.getItem}, 'redux-saga')
.
fn
can be a string or a function.
Same as spawn([context, fn], ...args)
but supports passing context
and
fn
as properties of an object, i.e.
yield spawn({context: localStorage, fn: localStorage.getItem}, 'redux-saga')
.
fn
can be a string or a function.
Same as
fork(fn, ...args)
but creates a detached task. A detached task remains independent from its parent and acts like a top-level task. The parent will not wait for detached tasks to terminate before returning and all events which may affect the parent or the detached task are completely independents (error, cancellation).