Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(store): Centralize store #49

Merged
merged 1 commit into from
Aug 10, 2018
Merged

Conversation

jakipatryk
Copy link
Owner

Changes made mostly to avoid future problems with lazy loaded feature modules with store:

  • move feature stores to one central place
  • base store on root and feature store NgModules
  • refactor file structure of every store
  • create SharedModule with reusable confirm dialog (component)
  • move store-specific components to store NgModules
  • update containers so they correctly use refactored store
  • use @ngrx/entity in drafts store

@jakipatryk jakipatryk self-assigned this Aug 10, 2018
);
}

broadcast(post: SteeditorPost): void {
this.store.dispatch(fromFeatureStore.broadcast(post));
broadcast(draft: Draft): void {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It receives SteeditorPost. broadcastDraft action creator expects Draft, thus id should be added (like in updateDraft).

@@ -7,7 +7,7 @@
</span>

<span fxFlex class="toolbar__button">
<app-log-in-out [isAuthenticated]="isAuthenticated$ | async" [isLoggingOut]="isLoggingOut$ | async" (login)="login()" (logout)="logout()"></app-log-in-out>
<app-log-in-out [isAuthenticated]="currentUser$ | async" [isLoggingOut]="isLoggingOut$ | async" (login)="login()" (logout)="logout()"></app-log-in-out>
Copy link
Owner Author

@jakipatryk jakipatryk Aug 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably should be cast to boolean or isAuthenticated should be renamed.

- move feature stores to one central place
- base store on root and feature store NgModules
- refactor file structure of every store
- create SharedModule with reusable confirm dialog (component)
- move store-specific components to store NgModules
- update containers so they correctly use refactored store
- use @ngrx/entity in drafts store
@jakipatryk jakipatryk merged commit 3ff1ef6 into master Aug 10, 2018
@jakipatryk jakipatryk deleted the refactor/central-store branch August 10, 2018 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant