Skip to content

Commit e1a18bc

Browse files
committed
Update doc comment
1 parent 2ebd302 commit e1a18bc

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

modules/elements/Route.js

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,26 @@ var FakeNode = require('../mixins/FakeNode');
1414
* The preferred way to configure a router is using JSX. The XML-like syntax is
1515
* a great way to visualize how routes are laid out in an application.
1616
*
17-
* React.renderComponent((
18-
* <Routes handler={App}>
17+
* var routes = [
18+
* <Route handler={App}>
1919
* <Route name="login" handler={Login}/>
2020
* <Route name="logout" handler={Logout}/>
2121
* <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+
* });
3528
*
3629
* 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.
3831
*
3932
* var App = React.createClass({
4033
* render: function () {
4134
* return (
4235
* <div class="application">
43-
* {this.props.activeRouteHandler()}
36+
* <RouteHandler/>
4437
* </div>
4538
* );
4639
* }

0 commit comments

Comments
 (0)