File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ Let's refactor our app to use React Router.
70
70
``` js
71
71
// first we import some components
72
72
import { Router , Route } from ' react-router' ;
73
+ // the histories are imported separately for smaller builds
73
74
import HashHistory from ' react-router/lib/HashHistory' ;
74
75
75
76
// ...
Original file line number Diff line number Diff line change @@ -95,11 +95,6 @@ and the url is `/users/123/portfolios/345` then `props.routeParams` will be
95
95
` {userId: '123'} ` , and ` route.params ` will be `{userId: '123',
96
96
portfolioId: 345}`.
97
97
98
-
99
- ### ` query `
100
-
101
- The query parameters of the url.
102
-
103
98
### ` location `
104
99
105
100
The [ location] [ location ] matched.
@@ -121,8 +116,7 @@ Examples
121
116
var Students = React .createClass ({
122
117
render () {
123
118
this .props .params .courseId ; // "123"
124
- this .props .query .sort ; // "name"
125
- this .props .location ; // { path: "/course/123/students?sort=name" }
119
+ this .props .location .query .sort ; // "name"
126
120
// ...
127
121
}
128
122
});
You can’t perform that action at this time.
0 commit comments