Skip to content

Latest commit

 

History

History
102 lines (72 loc) · 2.21 KB

README.md

File metadata and controls

102 lines (72 loc) · 2.21 KB

API 文档

redux-mutation API完全继承redux,然后有新增API和小改动。

[参数]中括号代表可选。

顶层 API

import

import {
  combineReducers,
  applyMiddleware,
  //new and changed api below
  compose,
  createStore,
  configCreateStore,
  applyPlugin,
  SEPARATOR,
} from 'redux-mutation';

umd

const {
  combineReducers,
  applyMiddleware,
  //new and changed api below
  compose,
  createStore,
  configCreateStore,
  applyPlugin,
  SEPARATOR,
} = window.ReduxMutation;

Store API

const store = createStore(mutations);
//或者 const store = configCreateStore(...args)(mutations)
const {
  dispatch,
  getState,
  subscribe,
  replaceReducer,
  replaceMutations,
} = store;

其他 API

Center

center(action,centerUtils)

CenterEnhancer

centerEnhancer(originalCenter,centerUtils,currentMutation,actionType)

ReducerEnhancer

reducerEnhancer(originalReducer)