React & Dva & Actions & dispatch & effects
React & Dva & Actions & dispatch & effects
dispatch
https://dvajs.com/guide/introduce-class.html#dispatch-方法
https://dvajs.com/knowledgemap/#route-components
effects
dva.js 触发effetct 请求
namespace/effects_action
componentDidMount() {
const {
activeAppWebId,
// activeAppWebType,
pointCheck: {
os,
name,
appId,
dataSource,
pagination: {
pageSize,
total,
current,
},
// activeAppWebId,
},
dispatch,// hidden props
} = this.props;
let payload = {
os,
name,
appId,
dataSource,
pagination: {
pageSize,
total,
current,
},
activeAppWebId,
};
// log(`payload`, payload);
dispatch({
type: "pointCheck/fetchTableData",// namespace/effects_action
payload,
});
}
refs
https://zzk.cnblogs.com/my/s/blogpost-p?Keywords=redux-saga
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/11559486.html
未经授权禁止转载,违者必究!