Skip to content

indlekofer/redux-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published