Platform: replaceReducer has been deprecated

Created on 23 Jul 2017  路  2Comments  路  Source: ngrx/platform

There's no documentation (as far as i've looked), nor migration guide update, as to why replaceReducer has been removed. Can it be explained why it was removed and how to use it in release 4

use case ... in angular 4.x
initial reducer SiteStore is loaded at bootstrap
reducer SiteStore and StoreReducer (from module) are combined and lazy loaded and replace A

export const appReducers: any = {
    coverage: StoreReducer,
    siteStore: SiteStore,
};
constructor(private store: Store<any>) {
        this.store.replaceReducer(combineReducers(appReducers));
    }

thanks

Most helpful comment

If I understand this properly, I think that you can achieve this same functionality now by providing with StoreModule.forFeature() , as described here: https://github.com/ngrx/platform/blob/master/docs/store/api.md#feature-module-state-composition

All 2 comments

If I understand this properly, I think that you can achieve this same functionality now by providing with StoreModule.forFeature() , as described here: https://github.com/ngrx/platform/blob/master/docs/store/api.md#feature-module-state-composition

Link does not work anymore

Was this page helpful?
0 / 5 - 0 ratings