JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q46731F
  • License GPL-3.0

tiny redux store

Package Exports

  • redux-micro

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 (redux-micro) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

redux-micro

Build Status Coverage Status

tiny redux store with effects support

0.5kB (minified + gzipped)

npm install -S redux-micro

Usage

Store

constructor

parameter type
state {}
actions {}
reducers Reducer[]
effects Effect[]
logger (action: string, payload: any, state: any) => void

methods

method parameters returns
dispatch action: string, payload: any void
setState state: {} void
subscribe targetBranch: string, callback: (state) => void int
unsubscribe id: int void

Reducer

Object with following attributes:

attribute type description
target string store branch to be effected
actions string[] actions on which this reducer will be triggered
func (action: string, payload: any, state: any) => any reducer func that shall be pure

Effect

Object with following attributes:

attribute type description
actions string[] actions on which this reducer will be triggered
func (action: string, payload: any, callback: ({action: string, payload: any}[]) => void effect func that calls the callback with all successive dispatch calls