Is it possible to add new properties to an action with an action creator function that is reusable?
Actions in NGRX have the type property. I want to extend Actions to add a new property (Called customType) to all of my actions throughout my project. Basically I want to be able to listen in an effect for all actions that then have that property (Let's say action.customType === 'HTTP') with the idea to be able to have a single feature module that can keep track of the loading & error state of HTTP calls that is tied back to the action.
With goal to essentially be able to do this in a component:
this.store.dispatch(action.loadObject());
this.isLoading$ = this.store(httpSelectors.isLoading).pipe(x => x(action.loadObject))