From d28bf861297ed1a45e44f8628d0dcd4d2942ae66 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Thu, 16 Nov 2017 21:38:41 -0800 Subject: [PATCH] Skip toJS() call in default mapStateToProps function --- src/core/plugins/view/root-injects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/plugins/view/root-injects.js b/src/core/plugins/view/root-injects.js index fc67f165..04d0131a 100644 --- a/src/core/plugins/view/root-injects.js +++ b/src/core/plugins/view/root-injects.js @@ -22,7 +22,7 @@ const RootWrapper = (reduxStore, ComponentToWrap) => class extends Component { const makeContainer = (getSystem, component, reduxStore) => { const mapStateToProps = function(state, ownProps) { const propsForContainerComponent = Object.assign({}, ownProps, getSystem()) - const ori = component.prototype.mapStateToProps || (state => state.toJS()) + const ori = component.prototype.mapStateToProps || (state => { return {state} }) return ori(state, propsForContainerComponent) }