@@ -95,7 +95,7 @@ var Users = React.createClass({
95
95
});
96
96
```
97
97
98
- #### ` getComponent(callback) `
98
+ #### ` getComponent(location, callback) `
99
99
100
100
Same as ` component ` but asynchronous, useful for
101
101
code-splitting.
@@ -107,13 +107,13 @@ code-splitting.
107
107
##### Example
108
108
109
109
``` js
110
- < Route path= " courses/:courseId" getComponent= {(cb ) => {
110
+ < Route path= " courses/:courseId" getComponent= {(location , cb ) => {
111
111
// do asynchronous stuff to find the components
112
112
cb (null , Course);
113
113
}}/ >
114
114
```
115
115
116
- #### ` getComponents(callback) `
116
+ #### ` getComponents(location, callback) `
117
117
118
118
Same as ` components ` but asynchronous, useful for
119
119
code-splitting.
@@ -125,7 +125,7 @@ code-splitting.
125
125
##### Example
126
126
127
127
``` js
128
- < Route path= " courses/:courseId" getComponent= {(cb ) => {
128
+ < Route path= " courses/:courseId" getComponent= {(location , cb ) => {
129
129
// do asynchronous stuff to find the components
130
130
cb (null , {sidebar: CourseSidebar, content: Course});
131
131
}}/ >
@@ -141,4 +141,4 @@ Called when a route is about to be entered. It provides the next router state an
141
141
142
142
#### ` onLeave() `
143
143
144
- Called when a route is about to be exited.
144
+ Called when a route is about to be exited.
0 commit comments