createWatchMatcher
创建可以提供给Watch
匹配action
的matcher
。
用法
import { createMatcher } from "redux-eazy";
import { dp, getActionType } from "../..";
import { startAppListening } from "../../setup";
const watch = () => {
startAppListening({
matcher: createMatcher((action) => {
return action.type == `${getActionType("appStore").setPagination}`;
}),
effect: async () => {
dp("appStore", "queryAct");
},
});
};
export default watch;