Initialize SubReducer class with given name
(key) and [initState]
Object that holds functions to manage subreducer, join
reducers, on
add per-action reducers,
stateSelector
select state controlled by reducer from app state,
reducer getting reducer for connecting with redux.
That argument is key in state object.
he initial state. You may optionally specify it to hydrate the state from the server in universal apps, or to restore a previously serialized user session. If you join another reducer, this must be a plain object with the same shape as the keys passed to it. Otherwise, you are free to pass anything that your reducer can understand.
Returns _name
Join subreducer to another. If subreducer with same name already joined, it will be unjoined before joining new.
SubReducer
Map given ActionReducer to actionReducerList
with IExtendAction.type as key
Action or actions array
Action reducer
Reducer function that reduce given state
with action
and returns new state.
Also call each subscribers handler
.
If current state
is function, call it with action
as first argument and returns result.
If current state
and initState not a object (example string
or number
) pass state
to ActionReducer and returns result.
If current state
is object
reduce all joined ISubReducer
(reducers)
after pass state
to ActionReducer and returns result.
Set given reducer
to parent
Select subreducer controlled state from root state
The state that you can get from store.getState()
Generated using TypeDoc
SubReducer it's a class thats give acces to some additional functions to help build complicated reducers.