0.1.0 • Published 3 months ago

@leaddreamer/enhancedredux v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

view on
npm

@SaltSweetSpirits/ESBrowser

An Enhanced Redux store, with defered subscribe/unsubscribe functionality

Modules

ConfigureStore

Customzied Redux Store and support - legacy naming

ConfigureStore.store : ReduxStore

Kind: static constant of ConfigureStore

ConfigureStore~asyncReducers : object

Initializes a dictionary to keep track of the registered async reducers

Kind: inner property of ConfigureStore

ConfigureStore~listeners : object

Initializes a dictionary to keep track of registered defered inits

Kind: inner property of ConfigureStore

ConfigureStore~injectReducer(key, asyncReducer)

Kind: inner method of ConfigureStore

ParamTypeDescription
keystringunique key/name
asyncReducercallback

ConfigureStore~injectListener(key, listener, deleteOnSub)

Kind: inner method of ConfigureStore

ParamTypeDescription
keystringunique string to identify this listener
listenerfunctionfunction that establishes a database listener; expects function to return an unsubscribe function.
deleteOnSubbooleanflag to indicate whether to delete the listener altogether when unsubscribed (removes from defers)

ConfigureStore~runListener(key)

Runs a specific listener by Key

Kind: inner method of ConfigureStore

ParamTypeDescription
keystringunique string to identify which listener to start expects the listener to return an unsubscribe function to be saved

ConfigureStore~deferred()

Runs all defered listeners

Kind: inner method of ConfigureStore

ConfigureStore~unsubscribeListeners()

Calls all listener's unsubscribe functions

Kind: inner method of ConfigureStore

ConfigureStore~createReducer(asyncReducers)

takes an array of reducers (possibly async) and returns a single reducer structure

Kind: inner method of ConfigureStore

ParamType
asyncReducersArray.callback

ConfigureStore~ReduxStore : object

Kind: inner typedef of ConfigureStore

EnhancedRedux

A cross-project Redux store configuration

BoilerplateRedux

Generic Redux functions and constants

BoilerplateRedux.BROWSINGDATE

Kind: static constant of BoilerplateRedux

BoilerplateRedux.genericReduxAction(sliceName, specific, payload) ⇒ ActionItem

Creates and returns an ActionItem based on the "slice" name, specific action type, and payload

Kind: static method of BoilerplateRedux

ParamTypeDescription
sliceNamestring
specificstringaction type
payloadobject

BoilerplateRedux.setGeneric(sliceName, specific, payload) ⇒ ActionItem

Creates and dispatches an ActionItem based on the "slice" name, specific action type, and payload

Kind: static method of BoilerplateRedux

ParamTypeDescription
sliceNamestring
specificstringaction type
payloadobject

BoilerplateRedux.reducerGenerator(sliceName, initialState) ⇒ ReduxSliceReducer

Generic Reducer Generator

Kind: static method of BoilerplateRedux

ParamTypeDescription
sliceNamestringname for this redux section
initialStateobjectspecific state to initialize this slice to

BoilerplateRedux.selectGeneric(state, sliceName, which)

gets Redux information by "slice" (really, which reducer) and "which" (table name) Synchronous to state changes

Kind: static method of BoilerplateRedux

ParamTypeDescription
stateReduxStateRedux state/store
sliceNamestringa name to identify the reducer/state segment
whichstringthe name of the sub-table ("specific type")

BoilerplateRedux.getGeneric(sliceName, which)

gets Redux information by "slice" (really, which reducer) and "which" (table name) Asynchronous to state changes

Kind: static method of BoilerplateRedux

ParamTypeDescription
sliceNamestringa name to identify the reducer/state segment
whichstringthe name of the sub-table ("specific type")

BoilerplateRedux.firstSplit(target, searchvalue) ⇒ Array.string

Function to split a string at the FIRST instance of a character

Kind: static method of BoilerplateRedux
Returns: Array.string - - a 2-entry array - the string BEFORE the FIRST searchValue, and the rest of the string AFTER the search Value

ParamTypeDescription
targetstringstring to be split
searchvaluestringvalue to use for the split

BoilerplateRedux~ActionItem : object

Kind: inner typedef of BoilerplateRedux
Properties

NameType
typestring
payloadobject

monitorReducers

monitorReducers~monitorReducerEnhancer(createStore) ⇒ ReduxStore

Kind: inner method of monitorReducers

ParamType
createStorecallback

middlewareLogger

middlewareLogger~logger()

chained

Kind: inner method of middlewareLogger

RootReducer

module.exports(state, action) ⇒ ReduxState

Kind: Exported function

ParamType
stateReduxState
actionactionType

© 2020-2023 Tracy Hall

0.1.0

3 months ago

0.1.0-beta.5

3 months ago

0.1.0-beta.4

3 months ago

0.1.0-beta.3

4 months ago

0.1.0-beta.2

5 months ago