Closed jsdmc closed 8 years ago
To get the build to work on Node 0.12, please change
action.type.includes(key)
to
~action.type.indexOf(key)
on multireducer.js:17
. Such a great js hack, that one. :-)
@erikras fixed. Relied on babel here) Expected includes
to work after transpiling. The same issue with find
method of Arrays.
This change kind of break encapsulation. I was using multireducer to not need to know where in the tree the "sub-state" is, now, it seems that I need to be aware of the whole state.
@erikras Breaking change is only for
mapStateToProps(key, state, ownProps)
. Now it's first argument is a multireducerKey passed to component. We can keep old signature and accessmultireducerKey
fromownProps
, but as you mentioned earlier, react-redux'sconnect
makes some optimizations - thus it's better not to useownProps
if it's not used. Also now whole state passed tomapStateToProps
. I think it's more flexible way. You can still grab needed state slice usingkey
param. @adailey14 Please take a look as there is a bunch of your changes)