Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redux Devtools angular 8 #103

Open
justintim-es opened this issue Dec 3, 2019 · 1 comment
Open

Redux Devtools angular 8 #103

justintim-es opened this issue Dec 3, 2019 · 1 comment

Comments

@justintim-es
Copy link

justintim-es commented Dec 3, 2019

Im trying to configure the redux devtools in app.module the way is used to configure it, but now i get an intellesense error.

Type 'StoreEnhancer<any, {}>[]' is not assignable to type 'Middleware<{}, any, Dispatch>'.
Type 'StoreEnhancer<any, {}>[]' provides no match for the signature '(api: MiddlewareAPI<Dispatch, any>): (next: Dispatch) => (action: any) => any'

constructor(private ngRedux: NgRedux<IAppState>, devTools: DevToolsExtension) { const enhancer = isDevMode() ? [devTools.enhancer()] : []; this.ngRedux.configureStore(reducers, initialState, enhancer); }

@dkowis
Copy link

dkowis commented Dec 4, 2019

I've got it working in angular8, typescript is happy with this:

  constructor(
    ngRedux: NgRedux<RctState>,
    devTools: DevToolsExtension,
    referenceApiEpics: ReferenceApiEpics,
    interchangeEpics: InterchangePropertyProfileEpics,
    valuationEpics: ValuationResultEpics,
    standardizedAddressEpics: StandardizedAddressEpics
  ) {
    const initialState: RctState = { };

    const epicMiddleware = createEpicMiddleware();

    ngRedux.configureStore(
      rootReducer,
      initialState,
      [
        epicMiddleware
      ],
      devTools.isEnabled() ? [devTools.enhancer()] : []
    );

    epicMiddleware.run(combineEpics<any>(
      ...referenceApiEpics.createEpics(),
    ));
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants