Closed
Description
I propose we should make combineReducers()
work with ImmutableJS and any other libraries. This way all the checks it makes would work out of the box, but the actual state transformation for associating the values would be swappable.
I’m thinking something like combineReducers(reducers, [options])
.
By default options
is something like
{
create: (obj) => obj,
get: (state, key) => state[key]
}
but you could supply something like
{
create: (obj) => (obj instanceof Immutable.Map) ? obj : new Immutable.Map(obj),
get: (state, key) => state.get(key)
}
Does this make sense to anyone?
If you’d like to work on a PR to make a proof of concept, please comment here and submit it!
If you think it’s a bad idea, please write here as well.