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

NGRX actions update? #100

Open
MaciejWWojcik opened this issue Nov 12, 2021 · 2 comments
Open

NGRX actions update? #100

MaciejWWojcik opened this issue Nov 12, 2021 · 2 comments

Comments

@MaciejWWojcik
Copy link
Contributor

Hey, I was wondering if it makes sense to update this item on the checklist:
https://angular-checklist.io/default/checklist/ngrx/iglD3

It's about defining Actions as classes, like that:

  export enum AppActionTypes {
    APP_PAGE_LOAD_USERS = '[App Page] Load Users'
  }
  
  export class AppPageLoadUsers implements Action {
    readonly type = AppActionTypes.APP_PAGE_LOAD_USERS;
  }

However, based on the newest ngrx docs (https://ngrx.io/guide/store/actions), it maybe should look more like this:

  export const loadUsers = createAction('[App Page] Load Users');

What do you think about that?
I'm happy to update this content item, but I'm not sure if we want that, and if so, how many changes do we think it needs?
I'm not sure if "note + resources" makes much sense when using a new ngrx wrapper for actions.

@d3lm
Copy link
Member

d3lm commented Jun 29, 2022

Hey! Yes, it would be awesome if we could update this to reflect the recommendations of the ngrx team. Would you be down to send a PR?

@MaciejWWojcik
Copy link
Contributor Author

Hey! Yeah I can do it but would do it in a few weeks when I start working with ngrx again in new project :) right now I feel I don't know all newest recommendations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants