@SaltSweetSpirits/ESBrowser
An Enhanced Redux store, with defered subscribe/unsubscribe functionality
Modules
- ConfigureStore
-
Customzied Redux Store and support - legacy naming
- EnhancedRedux
-
A cross-project Redux store configuration
- BoilerplateRedux
-
Generic Redux functions and constants
- monitorReducers
- middlewareLogger
- RootReducer
ConfigureStore
Customzied Redux Store and support - legacy naming
-
ConfigureStore
-
static
-
.store :
ReduxStore
-
.store :
- inner
-
static
ReduxStore
ConfigureStore.store : Kind: static constant of ConfigureStore
object
ConfigureStore~asyncReducers : Initializes a dictionary to keep track of the registered async reducers
Kind: inner property of ConfigureStore
object
ConfigureStore~listeners : Initializes a dictionary to keep track of registered defered inits
Kind: inner property of ConfigureStore
ConfigureStore~injectReducer(key, asyncReducer)
Kind: inner method of ConfigureStore
Param | Type | Description |
---|---|---|
key | string |
unique key/name |
asyncReducer | callback |
ConfigureStore~injectListener(key, listener, deleteOnSub)
Kind: inner method of ConfigureStore
Param | Type | Description |
---|---|---|
key | string |
unique string to identify this listener |
listener | function |
function that establishes a database listener; expects function to return an unsubscribe function. |
deleteOnSub | boolean |
flag 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
Param | Type | Description |
---|---|---|
key | string |
unique 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
Param | Type |
---|---|
asyncReducers | Array.callback |
object
ConfigureStore~ReduxStore : Kind: inner typedef of ConfigureStore
EnhancedRedux
A cross-project Redux store configuration
BoilerplateRedux
Generic Redux functions and constants
-
BoilerplateRedux
-
static
- .BROWSINGDATE
-
.genericReduxAction(sliceName, specific, payload) ⇒
ActionItem
-
.setGeneric(sliceName, specific, payload) ⇒
ActionItem
-
.reducerGenerator(sliceName, initialState) ⇒
ReduxSliceReducer
- .selectGeneric(state, sliceName, which)
- .getGeneric(sliceName, which)
-
.firstSplit(target, searchvalue) ⇒
Array.string
-
inner
-
~ActionItem :
object
-
~ActionItem :
-
static
BoilerplateRedux.BROWSINGDATE
Kind: static constant of BoilerplateRedux
ActionItem
BoilerplateRedux.genericReduxAction(sliceName, specific, payload) ⇒ Creates and returns an ActionItem based on the "slice" name, specific action type, and payload
Kind: static method of BoilerplateRedux
Param | Type | Description |
---|---|---|
sliceName | string |
|
specific | string |
action type |
payload | object |
ActionItem
BoilerplateRedux.setGeneric(sliceName, specific, payload) ⇒ Creates and dispatches an ActionItem based on the "slice" name, specific action type, and payload
Kind: static method of BoilerplateRedux
Param | Type | Description |
---|---|---|
sliceName | string |
|
specific | string |
action type |
payload | object |
ReduxSliceReducer
BoilerplateRedux.reducerGenerator(sliceName, initialState) ⇒ Generic Reducer Generator
Kind: static method of BoilerplateRedux
Param | Type | Description |
---|---|---|
sliceName | string |
name for this redux section |
initialState | object |
specific 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
Param | Type | Description |
---|---|---|
state | ReduxState |
Redux state/store |
sliceName | string |
a name to identify the reducer/state segment |
which | string |
the 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
Param | Type | Description |
---|---|---|
sliceName | string |
a name to identify the reducer/state segment |
which | string |
the name of the sub-table ("specific type") |
Array.string
BoilerplateRedux.firstSplit(target, searchvalue) ⇒ 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
Param | Type | Description |
---|---|---|
target | string |
string to be split |
searchvalue | string |
value to use for the split |
object
BoilerplateRedux~ActionItem : Kind: inner typedef of BoilerplateRedux
Properties
Name | Type |
---|---|
type | string |
payload | object |
monitorReducers
ReduxStore
monitorReducers~monitorReducerEnhancer(createStore) ⇒ Kind: inner method of monitorReducers
Param | Type |
---|---|
createStore | callback |
middlewareLogger
middlewareLogger~logger()
chained
Kind: inner method of middlewareLogger
RootReducer
ReduxState
⏏
module.exports(state, action) ⇒ Kind: Exported function
Param | Type |
---|---|
state | ReduxState |
action | actionType |
© 2020-2023 Tracy Hall