JSPM

@guiguzixl/redux-add-reducer

1.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 156
  • Score
    100M100P100Q53472F
  • License ISC

Redux enhancer which adds dynamically reducer

Package Exports

  • @guiguzixl/redux-add-reducer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@guiguzixl/redux-add-reducer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

redux-add-reducer

Redux enhancer which adds dynamically reducer

install

npm install --save @guiguzixl/redux-add-reducer

or

yarn add @guiguzixl/redux-add-reducer

example

单独使用

import { createStore } from 'redux'
import addReducer from '@guiguzixl/redux-add-reducer'
const store = createStore(reducer, preloadState, addReducer)

配合其他 redux enhancer 使用

import { createStore, compose } from 'redux'
import addReducer from '@guiguzixl/redux-add-reducer'
const store = createStore(reducer, preloadState, compose(...otherEnhancer,addReducer))

添加 reducer

store.addReducer({
  reducerKey: reducerFunction,
})