Skip to main content

createWatchMatcher

创建可以提供给Watch匹配actionmatcher

用法

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;