-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels