Open zuzust opened 7 years ago
Implementations like the actual one:
I assume this would be more elegant:
In app.module.ts
StoreModule.provideStore({ currentSearch: CurrentSearchReducer })
In xxx.component.ts
constructor(private store: Store<any>) { this.store.select('currentSearch') .subscribe((data) => { ... }); }
Some interesting literature for a better ngrx structure:
Here you are a few more readings that will help in state management refactoring:
Make sure ngrx/store patterns are applied the right way. If not, refactor accordingly.