0.0.2 • Published 5 years ago

create-fetch-action v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

README

  • 结合antdnotification组件和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');