【发布时间】:2022-01-20 04:51:05
【问题描述】:
我有以下情况:
当以下这些操作之一被调度时,我想将reducer 中的saving 设置为true。但目前我没有在减速器中“捕捉”这些动作。我只是在我的effects 中“捕捉”这些。现在我有一个问题,是否可以创建一个“基本”动作,当我在下面调度我的动作时会自动调用它?如果可能的话,我想在我的reducer 中捕捉这些“基本”操作,以更改saving 的值。
/**
* Update Match Conditions
*/
export const updateMatchConditions = createAction(
AccountMatchingPageConstants.UPDATE_MATCH_CONDITIONS,
props<{ accountId: string, connection: Connection, matchConditionUpdate: MatchConditionUpdate[] }>()
);
/**
* Reset Match Conditions
*/
export const resetMatchConditions = createAction(
AccountMatchingPageConstants.RESET_MATCH_CONDITIONS,
props<{ accountId: string, connection: Connection }>()
);
【问题讨论】:
标签: javascript angular typescript ngrx