Here's the scenario I'm facing:
When any of the actions listed below are dispatched, I need to update the saving
property in the reducer
to true
. However, currently, I am not handling these actions in the reducer; instead, I handle them in my effects
. My question is whether it's possible to create a 'basic' action that will automatically be triggered whenever I dispatch the actions below. If this is possible, I would like to capture this 'basic' action in my reducer
to modify the value of 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 }>()
);