I have to ways of doing the same thing, although I prefer the first one. But the first approach doesn't seem to work. (the tap()
is not triggered)
// does not work
this.actions$.pipe(
ofType(LayoutActions.Types.CHANGE_THEME),
takeUntil(this.destroyed$),
tap(() => {
console.log('test')
}),
);
// works
this.actions$.ofType(LayoutActions.Types.CHANGE_THEME).subscribe(() => {
console.log('test')
});