dynamic replaceEpic(Epic<State, Action> newEpic)

Replaces the epic currently used by the middleware.

It is an advanced API. You might need this if your app grows large and want to instantiate Epics on the fly, rather than as a whole up front.

Source

replaceEpic(Epic<State, Action> newEpic) {
  epic = newEpic;

  epics.add(newEpic);
}