0.0.2 • Published 6 years ago
create-fetch-action v0.0.2
README
- 结合
antd
的notification
组件和whatwg-fetch
,快速创建action
import { createAction, handleActions } from 'redux-actions';
import createFetchAction from './src/index.js';
//创建 action
const fetchInfoOk = createAction('登录成功');
const API = 'http://xx.xx';
const fetchInfo = createFetchAction(`${API}/api/info/`, [fetchInfoOk], 'GET');