Skip to content

Commit f268536

Browse files
committed
Flux - 5 - Nesting Routes
1 parent 3ea1d06 commit f268536

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

imgur-client/src/app.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ var Hello = React.createClass({
1414

1515
var Child1 = React.createClass({
1616
render: function() {
17-
return <h1>I'm child1</h1>
17+
return <h1>
18+
I'm child1
19+
{this.props.children}
20+
</h1>
1821
}
1922
});
2023

@@ -27,7 +30,9 @@ var Child2 = React.createClass({
2730
var routes = (
2831
<Router history={new HashHistory}>
2932
<Route path="/" component={Hello}>
30-
<Route path="1" component={Child1} />
33+
<Route path="1" component={Child1}>
34+
<Route path="2" component={Child2} />
35+
</Route>
3136
<Route path="2" component={Child2} />
3237
</Route>
3338
</Router>

0 commit comments

Comments
 (0)