From 6f2e4a53759e3f02ce4060081065a64363f99e7d Mon Sep 17 00:00:00 2001 From: wildlifehexagon Date: Tue, 27 Nov 2018 09:30:26 -0600 Subject: [PATCH] fix: remove console warning caused by HOC action --- src/components/common/withDataFetching.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/common/withDataFetching.js b/src/components/common/withDataFetching.js index 951ded744..046bff566 100644 --- a/src/components/common/withDataFetching.js +++ b/src/components/common/withDataFetching.js @@ -10,6 +10,8 @@ const WithDataFetching = ( ) => WrappedComponent => { class WithDataFetchingComponent extends Component { componentDidMount() { + const { action } = this.props + action() } @@ -57,7 +59,7 @@ const WithDataFetching = ( return connect( mapStateToProps, - action, + { action }, )(WithDataFetchingComponent) }