I have following statement which was working well with rxjs5.5 and redux observable 0.x. Now, I'm using redux-observable v1, and rxjs v6. I coulnd't figure out how to trasform race for following code (since it's usage deprecated).
(action$, state$) =>
action$.pipe(
ofType(REQUEST),
switchMap(action => {
return race(
action$.pipe(
ofType(REQUEST_CANCEL),
take(1),
mapTo(
observableOf(
failure({
description: "Cancelled by user."
})
)
),
ajax(`url`).pipe(
map(response => response.response),
map(data => success(data)),
catchError(error =>
handleError(FAILURE, error)
)
)
)
);
})
),
There migh be some other problem, It doesn't make the request. It think race is the problem.