Skip to content

Commit 4c51b81

Browse files
committed
fix RouteLookup docs
1 parent 9a265b3 commit 4c51b81

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

docs/api/mixins/RouteLookup.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Instance Methods
99

1010
### `getRoutes()`
1111

12-
Returns an array of the active routes in order of their hierarchy.
12+
Returns an array of all routes.
1313

1414
```js
1515
[route, route, ...]
1616
```
1717

1818
### `getNamedRoutes()`
1919

20-
Returns an object hash of active routes by name.
20+
Returns an object hash of all routes by name.
2121

2222
```js
2323
{user: route, users: route, ...}
@@ -31,13 +31,11 @@ Example
3131
-------
3232

3333
```js
34-
var TopLevelApp = React.createClass({
35-
mixins: [RouteLookup, PathState],
34+
React.createClass({
35+
mixins: [RouteLookup],
3636

37-
// `updatePath` is from `PathState`
38-
updatePath: function() {
39-
var deepestRoute = this.getRoutes().reverse()[0];
40-
document.title = deepestRoute.props.title;
37+
componentDidMount: function() {
38+
console.log(this.getRoutes())
4139
}
4240
});
4341
```

0 commit comments

Comments
 (0)