Skip to content

Commit 3cf3d07

Browse files
committed
update route doc
1 parent dcc7f6c commit 3cf3d07

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/api/Route.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ var Users = React.createClass({
9595
});
9696
```
9797

98-
#### `getComponent(callback)`
98+
#### `getComponent(location, callback)`
9999

100100
Same as `component` but asynchronous, useful for
101101
code-splitting.
@@ -107,13 +107,13 @@ code-splitting.
107107
##### Example
108108

109109
```js
110-
<Route path="courses/:courseId" getComponent={(cb) => {
110+
<Route path="courses/:courseId" getComponent={(location, cb) => {
111111
// do asynchronous stuff to find the components
112112
cb(null, Course);
113113
}}/>
114114
```
115115

116-
#### `getComponents(callback)`
116+
#### `getComponents(location, callback)`
117117

118118
Same as `components` but asynchronous, useful for
119119
code-splitting.
@@ -125,7 +125,7 @@ code-splitting.
125125
##### Example
126126

127127
```js
128-
<Route path="courses/:courseId" getComponent={(cb) => {
128+
<Route path="courses/:courseId" getComponent={(location, cb) => {
129129
// do asynchronous stuff to find the components
130130
cb(null, {sidebar: CourseSidebar, content: Course});
131131
}}/>
@@ -141,4 +141,4 @@ Called when a route is about to be entered. It provides the next router state an
141141

142142
#### `onLeave()`
143143

144-
Called when a route is about to be exited.
144+
Called when a route is about to be exited.

0 commit comments

Comments
 (0)