how do we handle initial state as state passed down by store?
const initialState = {
count: 1
}
export default (reducers) => (
createStore(
combineReducer(reducers),
initialState,
applyMiddleware(...)
)
)
do we have access to the initial state on State?
export default State('count', {
initial: {
count: state.count || 1 // should be the same as the initialized value
},
addCount,
subCount
})
EDIT
sorry it seems i went ahead not looking at the source.
https://github.com/jumpsuit/jumpstate/blob/master/src/state.js#L32
thanks
how do we handle initial state as state passed down by store?
do we have access to the initial state on State?
EDIT
sorry it seems i went ahead not looking at the source.
https://github.com/jumpsuit/jumpstate/blob/master/src/state.js#L32
thanks