Skip to content

Commit 3545ab2

Browse files
committed
[removed] params from RoutingContext child context
1 parent c7bafe5 commit 3545ab2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

modules/RoutingContext.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ class RoutingContext extends Component {
2626

2727
static childContextTypes = {
2828
history: object.isRequired,
29-
location: object.isRequired,
30-
params: object.isRequired
29+
location: object.isRequired
3130
}
3231

3332
getChildContext() {
34-
const { history, location, params } = this.props
35-
return { history, location, params }
33+
const { history, location } = this.props
34+
return { history, location }
3635
}
3736

3837
createElement(component, props) {

modules/__tests__/RouteComponent-test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ describe('a Route Component', function () {
4747
class RouteComponent extends Component {
4848
static contextTypes = {
4949
history: object.isRequired,
50-
location: object.isRequired,
51-
params: object.isRequired
50+
location: object.isRequired
5251
}
5352
componentDidMount() {
5453
expect(this.context.history).toEqual(this.props.history)
5554
expect(this.context.location).toEqual(this.props.location)
56-
expect(this.context.params).toEqual(this.props.params)
5755
}
5856
render() {
5957
return null

0 commit comments

Comments
 (0)