applyAsyncEpics
A function that takes a stream of Epics and returns a store enhancer. for dynamic Epic injection.
Arguments
epic$(BehaviorSubject*[`Epic`](https://redux-observable.js.org/docs/basics/Epics.html)*): a stream of all epics in the runtime.
Returns
(Function): (Function): A store enhancer that is used as an argument for createStore. to enable dynamic Epic injection.
Example: Setting-up The dynamic Epic Injection
./src/epics
./src/epicsimport { createRootEpic } from '@react-observatory/inject-epic'
const logger = action$ =>
action$
.ofType('Up')
.do(console.log)
.ignoreElements()
const { epic$, rootEpic } = createRootEpic(logger)
export { epic$, rootEpic }./src/configureStore
./src/configureStoreLast updated