Hello all, I am relatively new to NgRx and so far most of my code is running smoothly. However, I've hit a roadblock with a specific issue and would appreciate some assistance.
The problem I'm facing is related to the Login Effect being triggered successfully and sent to LoginSuccess. I am attempting to save this data to localstorage and then trigger another action.
Below you can find a snippet of my code:
Login Effect
@Effect({ dispatch: false })
LogInSuccess$: Observable<any> = this.actions$.pipe(
ofType<businessActions.LogInSuccess>(
businessActions.AuthActionTypes.LOGIN_SUCCESS
),
map((action: businessActions.LogInSuccess) => {
localStorage.setItem('token', JSON.stringify(action.payload));
this.navCtrl.navigateRoot('/home');
}), map(
() => new businessActions.LoadBiz()
)
);