@@ -14,33 +14,26 @@ var FakeNode = require('../mixins/FakeNode');
14
14
* The preferred way to configure a router is using JSX. The XML-like syntax is
15
15
* a great way to visualize how routes are laid out in an application.
16
16
*
17
- * React.renderComponent((
18
- * <Routes handler={App}>
17
+ * var routes = [
18
+ * <Route handler={App}>
19
19
* <Route name="login" handler={Login}/>
20
20
* <Route name="logout" handler={Logout}/>
21
21
* <Route name="about" handler={About}/>
22
- * </Routes>
23
- * ), document.body);
24
- *
25
- * If you don't use JSX, you can also assemble a Router programmatically using
26
- * the standard React component JavaScript API.
27
- *
28
- * React.renderComponent((
29
- * Routes({ handler: App },
30
- * Route({ name: 'login', handler: Login }),
31
- * Route({ name: 'logout', handler: Logout }),
32
- * Route({ name: 'about', handler: About })
33
- * )
34
- * ), document.body);
22
+ * </Route>
23
+ * ];
24
+ *
25
+ * Router.run(routes, function (Handler) {
26
+ * React.render(<Handler/>, document.body);
27
+ * });
35
28
*
36
29
* Handlers for Route components that contain children can render their active
37
- * child route using the activeRouteHandler prop .
30
+ * child route using a <RouteHandler> element .
38
31
*
39
32
* var App = React.createClass({
40
33
* render: function () {
41
34
* return (
42
35
* <div class="application">
43
- * {this.props.activeRouteHandler()}
36
+ * <RouteHandler/>
44
37
* </div>
45
38
* );
46
39
* }
0 commit comments