redux-persist-immutable
redux-persist-immutable copied to clipboard
"'state.has' is not a function" error
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);
I'm also having the same issue. Is there any work around for this?
Same issue here. Any resolution or help on this?
me too