adab1ts / veinapp

Map your vicinity
MIT License
3 stars 3 forks source link

State management review #26

Open zuzust opened 7 years ago

zuzust commented 7 years ago

Make sure ngrx/store patterns are applied the right way. If not, refactor accordingly.

plastikaweb commented 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:

zuzust commented 7 years ago

Here you are a few more readings that will help in state management refactoring: