I want to clean all my states in the store after logging out . this is my reducers/index.ts
export interface AppState {
}
export const reducers: ActionReducerMap<AppState> = {
router: routerReducer
};
export const metaReducers: MetaReducer<AppState>[] = !environment.production ? [storeFreeze] : [];
my app.module.ts
StoreModule.forRoot(reducers, {metaReducers:[]})
beside i already has my auth reducer(authState) with two actions login and logout
I create a meta-reducer function in my index that when user logged out it will clear the store
and then added it in my app.module