You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 8, 2021. It is now read-only.
I also added a new ActionsService which allows to dispatch actions with extra information about the component which triggered the action. This helps a lot when you use the same action in multiple places and have to debug from where the action has been triggered. Let's say that we trigger an action from a HeaderComponent, in the Redux DevTools we will see "[HeaderComponent] MyAction". Of course you can still dispatch actions in a standard way, this is only an option if you need more debug information.
This looks like: // just import the ActionsService private actionsService: ActionsService, // sample action declaration export class MyAction { readonly type = 'MyAction'; constructor(public payload: MyObj) {} } // let's say we trigger the action from e.g. HeaderComponent, // in the Redux DevTools you will see: // [HeaderComponent] MyAction this.actionsService.dispatch(this, MyAction, payload);
I also added debug information to effects, to use it, just add at the end of the pipe: debugTypeMap('name$'):
Version 7.x of the ngrx plattform is out. And this package needs an update. I can provide a pull request for the update if you want.
The text was updated successfully, but these errors were encountered: