Closed liorbrauer closed 9 years ago
Well, this is silly. I seem to have made a similar mistake as the author of #10. I did not contruct my initialState
to be in the same structure as the output of combineReducers
, i.e I forgot to construct it with the reducer's domain.
/Silly me.
Similar to #10:
I am trying to init my store by calling a function
initStore(initialState)
like this (initialState
is anImmutable.Map
):if I debug the last line, the
store.getState()
returns the default initialState of the reducer, not the initialState I am sending here toinitStore(initialState)
.It seems that
combineReducers
creates the reducers with their default initialState, which is expected, but callingredux
'screateStore
with theinitialState
is not changing the state. What's the intended way to do so?