Skip to content

Commit d0e7e54

Browse files
committed
add links to the overview
1 parent dc7b749 commit d0e7e54

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

doc/00 Guides/0 Overview.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ var App = React.createClass({
2727
render () {
2828
var Child;
2929
switch (this.props.route) {
30-
case 'about': Child = About; break;
31-
case 'inbox': Child = Inbox; break;
30+
case '/about': Child = About; break;
31+
case '/inbox': Child = Inbox; break;
3232
default: Child = Home;
3333
}
3434

3535
return (
3636
<div>
3737
<h1>App</h1>
38+
<ul>
39+
<li><a href="#/about">About</a></li>
40+
<li><a href="#/inbox">Inbox</a></li>
41+
</ul>
3842
<Child/>
3943
</div>
4044
)
@@ -111,12 +115,19 @@ import HashHistory from 'react-router/lib/HashHistory';
111115

112116
// ...
113117

114-
// then we delete a bunch of code from `App`
118+
// then we delete a bunch of code from `App` and add some `Link`
119+
// components
115120
var App = React.createClass({
116121
render () {
117122
return (
118123
<div>
119124
<h1>App</h1>
125+
{/* change the <a>s to <Links>s */}
126+
<ul>
127+
<li><Link to="/about">About</Link></li>
128+
<li><Link to="/inbox">Inbox</Link></li>
129+
</ul>
130+
120131
{/*
121132
next we replace `<Child>` with `this.props.children`
122133
the router will figure out the children for us

0 commit comments

Comments
 (0)