@indlekofer/redux-store

1.2.1 • Public • Published

@indlekofer/redux-store

npm version

redux store with injectable reducers and middleware for module seperation

Usage

import store from '@indlekofer/redux-store';

//dispatch actions
store.dispatch({type: "test"});

//dispatch thunk - thunk middleware is always there
store.dispatch(() => (dispatch, getState) => dispatch({type: "test"}));

Function exports

injectReducer

reducer: function
namespace: string
force: boolean (optional default false) replace existing namspaces

removeReducer

remove a specific reducer by namespace

namespace: string

resetReducers

remove all reducers

injectMiddleware

middleware: function
namespace: string
force: boolean (optional default false) replace existing namspaces

removeMiddleware

namespace: string

resetMiddleware

Readme

Keywords

none

Package Sidebar

Install

npm i @indlekofer/redux-store

Weekly Downloads

10

Version

1.2.1

License

MIT

Unpacked Size

6.67 kB

Total Files

5

Last publish

Collaborators

  • daind