File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-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:
@@ -10,14 +9,15 @@ import hoistStatics from 'hoist-non-react-statics';
10
9
export default function connectData ( fetchData , fetchDataDeferred ) {
11
10
return function wrapWithFetchData ( WrappedComponent ) {
12
11
class ConnectData extends Component {
12
+
13
+ static fetchData = fetchData ;
14
+ static fetchDataDeferred = fetchDataDeferred ;
15
+
13
16
render ( ) {
14
17
return < WrappedComponent { ...this . props } /> ;
15
18
}
16
19
}
17
20
18
- ConnectData . fetchData = fetchData ;
19
- ConnectData . fetchDataDeferred = fetchDataDeferred ;
20
-
21
- return hoistStatics ( ConnectData , WrappedComponent ) ;
21
+ return ConnectData ;
22
22
} ;
23
23
}
You can’t perform that action at this time.
0 commit comments