Merge pull request #11215 from thegaryroberts/patch-1

Update react-router.d.ts
This commit is contained in:
Andy
2016-09-19 11:11:33 -07:00
committed by GitHub

View File

@@ -39,10 +39,10 @@ declare namespace ReactRouter {
type RouteComponent = Component
// use the following interface in an app code to get access to route param values, history, location...
// interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: number }> {}
// interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: string }> {}
// somewhere in MyComponent
// ...
// let id = this.props.routeParams.id
// let id = parseInt(this.props.routeParams.id, 10);
// ...
// this.props.history. ...
// ...