New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Immutable initialState and combineReducer #1100
Comments
Redux has no special baked-in support for Immutable.js or any other libraries. Nothing prevents you from initializing the root state with a regular object whose values are Immutable Maps. Then you can use the
This means you're passing something other than |
I know this is closed, I'd like to ask a follow-up question since I'm investigating this as well. If I use |
I am using pure immutable object for the whole state tree with those libs for combineReducer, which works well for me. |
So just to confirm, if you use the redux-immutable's |
@rclai Since the code I write for getter is state.getIn(['a', 'rest']), which means root state should be Immutable Object |
I am using Immutable Map as initialState for each of my sub-reducers. When directly applying combineReducer, there is error regarding with unexpected object in initialState. After searching a bit, I found libraries as redux-immutable and redux-immutablejs which replace default combineReducer. And it works great. However, according to author of of those libs here, it seems current (3.04) version of redux should support Immutable initialState natively.
I just want to make sure it is supported, and no library is needed for current version. (As it obviously not work without libs in my situation)
The text was updated successfully, but these errors were encountered: