Skip to content

Releases: angular-redux/redux-observable-decorator

Update to redux 4, redux-observable 1, rxjs 6

08 Jan 16:19
2302dd8
Compare
Choose a tag to compare

2.0.0

BREAKING CHANGES

  • As of version 1, redux-observable requires you to pass in the rootEpic through epicMiddleware.run(rootEpic) after creating a store. Now you'll need to pass in all epic classes to a separate combineDecoratedEpics call.

Before

import { createEpics } from 'redux-observable-decorator';

class NgModule{
  constructor(
    private store: NgRedux,
    private epicClass1: EpicClass1,
    private epicClass2: EpicClass2
  ) {
    const epicMiddleware = createEpics(epicClass1, epicClass2, options);
    store.configureStore(reducer, state, [epicMiddleware]);
  }
}

Now

import { createEpicMiddleware } from 'redux-observable';
import { combineDecoratedEpics } from 'redux-observable-decorator';

class NgModule{
  constructor(
    private store: NgRedux,
    private epicClass1: EpicClass1,
    private epicClass2: EpicClass2
  ) {
    const epicMiddleware = createEpicMiddleware(options);
    store.configureStore(reducer, state, [epicMiddleware]);
    epicMiddleware.run(combineDecoratedEpics(epicClass1, epicClass2));
  }
}
  • Update peer dependencies to redux 4, redux-observable 1 and rxjs 6