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

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


posted @ 2019-09-20 19:59  xgqfrms  阅读(234)  评论(2编辑  收藏  举报