File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 90
90
"express-session" : " ^1.12.1" ,
91
91
"history" : " 1.17.0" ,
92
92
"file-loader" : " ^0.8.5" ,
93
- "hoist-non-react-statics" : " ^1.0.3" ,
94
93
"http-proxy" : " ^1.12.0" ,
95
94
"invariant" : " ^2.2.0" ,
96
95
"less" : " ^2.5.3" ,
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
- import hoistStatics from 'hoist-non-react-statics' ;
3
2
4
3
/*
5
4
Note:
@@ -9,15 +8,18 @@ import hoistStatics from 'hoist-non-react-statics';
9
8
10
9
export default function connectData ( fetchData , fetchDataDeferred ) {
11
10
return function wrapWithFetchData ( WrappedComponent ) {
11
+
12
12
class ConnectData extends Component {
13
+
14
+ static fetchData = fetchData ;
15
+ static fetchDataDeferred = fetchDataDeferred ;
16
+
13
17
render ( ) {
14
18
return < WrappedComponent { ...this . props } /> ;
15
19
}
16
20
}
17
21
18
- ConnectData . fetchData = fetchData ;
19
- ConnectData . fetchDataDeferred = fetchDataDeferred ;
20
-
21
- return hoistStatics ( ConnectData , WrappedComponent ) ;
22
+ return ConnectData ;
23
+
22
24
} ;
23
25
}
You can’t perform that action at this time.
0 commit comments