Merge pull request #491 from jdegand/ngrx-note-comments

docs: ngrx notification comments
This commit is contained in:
Laforge Thomas
2024-01-12 21:05:58 +01:00
committed by GitHub
3 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
import { createActionGroup, emptyProps } from '@ngrx/store';
// This is the global actions.
export const appActions = createActionGroup({
source: 'App Component',
events: {

View File

@@ -31,9 +31,8 @@ export class NotificationService {
);
}
if (isSchool(notification)) {
// SchoolStore is not providedin root. thus at initialization, SchoolStore is undefined
// Option 1: set SchoolStore in root, but we don't want this to separate our class.
// Option 2: your turn
// SchoolStore is a ComponentStore. We can't dispatch a school action here.
// We are stuck. We must have done something wrong and need to refactor...
}
});
}

View File

@@ -35,7 +35,7 @@ export class SchoolStore
this.httpService.getAllSchools().pipe(
tapResponse(
(schools) => this.patchState({ schools }),
(_) => _,
(_) => _, // not handling the error
),
),
),