Localize component doesn't work with redux-immutable
See original GitHub issueHi there, thanks for a great project, we are using this in our app.
The higher order component Localize does not work when using redux-immutable, this is because the mapStateToProps function expects to find the slice at state[slice]
, whereas when using the redux-immutable combineReducers it saves the state as a Map.
This can be worked around, for example in our app we have used the normal combineReducers so that our state itself is a normal object, but our slices are immutable Maps. However this is not ideal because it breaks some conventions across our code base. Also it could put people off when trying to implement what is otherwise a great translation solution.
I suggest that a check is made and if the state object is a Map then state.get(slice) is called, I have tested this in my app and it works fine.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
I have submitted a pull request #50 which solves the issue described above.
Fixed in #58 and released in
v2.16.0