If you've the following effect
testEffects$ = createEffect(() => this.actions$.pipe(
ofType(RDX_TEST_INC_VALUE),
switchMap(ac => instance.get('/api/test/kam').then(res => {
return {
type: RDX_TEST_INC_VALUE_SUCCESS,
}
}).catch((err: AxiosError) => {
return {
type: RDX_TEST_INC_VALUE_ERROR,
}
}))
))
How do we return the payload of RDX_TEST_INC_VALUE with RDX_TEXT_INC_VALUE_SUCCESS?
Depending on exactly you want to achieve, something like this should work
If you want
withLatestFromor something else depends on your use case. See https://www.learnrxjs.io/learn-rxjs/operators/combination for reference. I also converted your promise into an observable via the from Operator as described in Convert Promise to Observable. Much easier to handle inside the stream.PS: Do not use forkJoin, it will not work with an action observable stream because it never completes.