I got the old and bad Property 'payload' does not exist on type 'Action
doing this actions subscription:
Since is a Creation Action, I need the payload to checkout the userId
of the recently created User and navigate to /users/userId
BTW: I'm following this really nice tutorial
@Component({
selector: 'app-sample',
templateUrl: 'sample.html',
})
export class AppComponent {
subs = new Subscription();
constructor(private actionsSubject: ActionsSubject) {
this.subs = actionsSubject.subscribe(action => {
if (action.type === actions.CREATE_USER_SUCCESS) {
console.log(action.payload);
}
});
}
}