xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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 发布文章使用:只允许注册用户才可以访问!


原文地址:https://www.cnblogs.com/xgqfrms/p/11559486.html