【发布时间】:2021-05-02 16:25:13
【问题描述】:
我需要修改史诗以便在完成删除后调用附加操作,史诗 看起来像:
const deleteComponentEpic: Epic<
AppActions,
AppActions,
AppStore,
ComponentDetailsEpicsDependencies
> = (action$, _, { components }) =>
action$.pipe(
filterAction(deleteComponentAction.request),
exhaustMap(action =>
components.deleteComponent(action.payload.id).pipe(
map(() => deleteComponentAction.success()),
catchError((error: Error) => of(deleteComponentAction.failure(errorHandler(error)))),
),
),
);
删除成功后需要调用下面的动作,怎么做?以下是我的行动的导入:
import { fetchCategoryComponentList } from '../../store';
【问题讨论】:
标签: reactjs typescript rxjs