Skip to content

Commit e0e44f4

Browse files
author
Michal Svrček
committed
hoist-non-react-statics no longer needed
1 parent bb2ea29 commit e0e44f4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"express-session": "^1.12.1",
9191
"history": "1.17.0",
9292
"file-loader": "^0.8.5",
93-
"hoist-non-react-statics": "^1.0.3",
9493
"http-proxy": "^1.12.0",
9594
"invariant": "^2.2.0",
9695
"less": "^2.5.3",

src/helpers/connectData.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component } from 'react';
2-
import hoistStatics from 'hoist-non-react-statics';
32

43
/*
54
Note:
@@ -10,14 +9,15 @@ import hoistStatics from 'hoist-non-react-statics';
109
export default function connectData(fetchData, fetchDataDeferred) {
1110
return function wrapWithFetchData(WrappedComponent) {
1211
class ConnectData extends Component {
12+
13+
static fetchData = fetchData;
14+
static fetchDataDeferred = fetchDataDeferred;
15+
1316
render() {
1417
return <WrappedComponent {...this.props} />;
1518
}
1619
}
1720

18-
ConnectData.fetchData = fetchData;
19-
ConnectData.fetchDataDeferred = fetchDataDeferred;
20-
21-
return hoistStatics(ConnectData, WrappedComponent);
21+
return ConnectData;
2222
};
2323
}

0 commit comments

Comments
 (0)