Is it feasible to enhance an action with additional properties using a reusable action creator function?
In NGRX, actions typically have the type property. I am interested in expanding the Actions by adding a new customType property to all actions across my project. The goal is to listen for actions in an effect that contain this customType property (such as action.customType === 'HTTP'), allowing for a centralized feature module to manage loading and error states specific to HTTP calls.
The ultimate aim is to achieve something like this in a component:
this.store.dispatch(action.loadObject());
this.isLoading$ = this.store(httpSelectors.isLoading).pipe(x => x(action.loadObject))