Skip to content

Commit

Permalink
Merge branch 'release/0.0.5-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
toshiyukihina committed May 17, 2016
2 parents f3878de + 96b3715 commit 349c7a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Expand Up @@ -2,6 +2,7 @@
==================

* [Lesson 5 - Active Links](https://github.com/reactjs/react-router-tutorial/tree/master/lessons/05-active-links) done
* Add `NavLink` component

0.0.4 / 2016/05/17
==================
Expand Down
6 changes: 3 additions & 3 deletions app/components/app.jsx
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import NavLink from './nav_link'

class App extends React.Component {

Expand All @@ -12,8 +12,8 @@ class App extends React.Component {
<div>
<h1>React Router Tutorial</h1>
<ul role="nav">
<li><Link to="/about" activeClassName="active">About</Link></li>
<li><Link to="/repos" activeClassName="active">Repos</Link></li>
<li><NavLink to="/about">About</NavLink></li>
<li><NavLink to="/repos">Repos</NavLink></li>
</ul>
{ this.props.children }
</div>
Expand Down
12 changes: 12 additions & 0 deletions app/components/nav_link.jsx
@@ -0,0 +1,12 @@
import React from 'react';
import { Link } from 'react-router';

class NavLink extends React.Component {

render() {
return (<Link {...this.props} activeClassName="active" />);
}

}

export default NavLink;

0 comments on commit 349c7a6

Please sign in to comment.