Skip to content

Commit 7520370

Browse files
nhunzakerryanflorence
authored andcommitted
No need for context
1 parent 08dc241 commit 7520370

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

modules/components/ContextWrapper.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,13 @@
55
*/
66

77
var React = require('react');
8-
var PropTypes = require('../PropTypes');
98

109
class ContextWrapper extends React.Component {
1110

12-
getChildContext() {
13-
return {
14-
router: this.context.router,
15-
routeDepth: this.context.routeDepth
16-
};
17-
}
18-
1911
render() {
2012
return this.props.children;
2113
}
22-
}
2314

24-
ContextWrapper.contextTypes = {
25-
routeDepth: PropTypes.number.isRequired,
26-
router: PropTypes.router.isRequired
27-
};
28-
29-
ContextWrapper.childContextTypes = {
30-
routeDepth: PropTypes.number.isRequired,
31-
router: PropTypes.router.isRequired
32-
};
15+
}
3316

3417
module.exports = ContextWrapper;

0 commit comments

Comments
 (0)