ReduxObservable cancellation based on action type and its data
问题 I have React app which uses redux-observable with typescript. In this scenario, FetchAttribute Action gets triggered with a id and then make an ajax call. In certain case, I would want to cancel the ajax request if "FETCH_ATTRIBUTE_CANCEL" action was triggered with the same id as of "FetchAttributeAction" action. action$.ofType(FETCH_ATTRIBUTE) .switchMap((request: FetchAttributeAction) => { return ajax.getJSON(`/api/fetch-attribute?id=${request.id}`) .flatMap((fetchUrl) => { // return new