Skip to content

Commit

Permalink
Merge pull request #491 from jdegand/ngrx-note-comments
Browse files Browse the repository at this point in the history
docs: ngrx notification comments
  • Loading branch information
tomalaforge authored Jan 12, 2024
2 parents d01b52c + b5eefff commit 0f57274
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/ngrx/notification/src/app/app.actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createActionGroup, emptyProps } from '@ngrx/store';

// This is the global actions.
export const appActions = createActionGroup({
source: 'App Component',
events: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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...
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrx/notification/src/app/school/school.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class SchoolStore
this.httpService.getAllSchools().pipe(
tapResponse(
(schools) => this.patchState({ schools }),
(_) => _,
(_) => _, // not handling the error
),
),
),
Expand Down

0 comments on commit 0f57274

Please sign in to comment.