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
tiny redux store with effects support
0.5kB (minified + gzipped)
npm install -S redux-microUsage
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 |