angular-checklist icon indicating copy to clipboard operation
angular-checklist copied to clipboard

NGRX actions update?

Open MaciejWWojcik opened this issue 4 years ago • 2 comments

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.

MaciejWWojcik avatar Nov 12 '21 16:11 MaciejWWojcik

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?

d3lm avatar Jun 29 '22 09:06 d3lm

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

MaciejWWojcik avatar Jul 02 '22 11:07 MaciejWWojcik