redux-persist-immutable icon indicating copy to clipboard operation
redux-persist-immutable copied to clipboard

"'state.has' is not a function" error

Open kbaird5 opened this issue 8 years ago • 3 comments

Using this code, I was getting the 'state.forEach' is not a function error. Now, I seem to get 'state.has' is not a function error. I assume these errors are related to having immutablejs just on substate instead of the full state. I verified that using a single state works. What is the magic to get multiple substates to work? Thanks.

const combinedReducers = combineReducers( { subStateA: stateAReducer, subStateB: stateBReducer } );

// combine initial state here; or set as default value on reducer which will be loaded when the reducer is const combinedInitialState = { subStateA: fromJS(subStateBInitialData), subStateB: fromJS(subStateBInitialData) };

const store = createStore(combinedReducers, combinedInitialState, composeEnhancers(middleware, autoRehydrate()));

persistStore(store);

kbaird5 avatar Aug 17 '17 18:08 kbaird5

I'm also having the same issue. Is there any work around for this?

indrasantosa avatar Sep 16 '17 20:09 indrasantosa

Same issue here. Any resolution or help on this?

JenilynnB avatar Oct 18 '17 00:10 JenilynnB

me too

nclsjstnn avatar Oct 20 '17 20:10 nclsjstnn