@@ -245,6 +245,8 @@ var Assignment = React.createClass({
245
245
// if you're not a route component, you need to pass location down the
246
246
// tree or get the location from context. We will probably provide a
247
247
// higher order component that will do this for you but haven't yet.
248
+ // see further down for more information on what can be passed down
249
+ // via context
248
250
var Assignment = React .createClass ({
249
251
contextTypes: {
250
252
location: React .PropTypes .object
@@ -261,13 +263,26 @@ and where you get it now if you're a route component (`this.props`)
261
263
262
264
| v0.13 (this) | v1.0 (this.props) |
263
265
| -----------------| ------------------------------------|
264
- | ` getPath() ` | ` location.pathname+location.query ` |
266
+ | ` getPath() ` | ` location.pathname+location.search ` |
265
267
| ` getPathname() ` | ` location.pathname ` |
266
268
| ` getParams() ` | ` params ` |
267
- | ` getQuery() ` | ` location.query ` |
269
+ | ` getQuery() ` | ` location.search ` |
268
270
| ` getRoutes() ` | ` routes ` |
269
271
| ` isActive(to, params, query) ` | ` history.isActive(pathname, query, onlyActiveOnIndex) ` |
270
272
273
+ Here is another table of properties you used to get via the ` State ` and
274
+ where you can get it now if you are ** not** a route component (` this.context ` ).
275
+
276
+ | v0.13 (this) | v1.0 (this.context) |
277
+ | -----------------| ------------------------------------|
278
+ | ` getPath() ` | ` location.pathname+location.search ` |
279
+ | ` getPathname() ` | ` location.pathname ` |
280
+ | ` getQuery() ` | ` location.search ` |
281
+ | ` isActive(to, params, query) ` | ` history.isActive(pathname, query, onlyActiveOnIndex) ` |
282
+
283
+ Note not all ` State ` functionality can be accessed via context in v1.0.
284
+ For example, ` params ` is not available via context.
285
+
271
286
### Scrolling
272
287
273
288
In 0.13.x we had a couple of implementations to restore scroll position,
0 commit comments