Browse Source

L9: IndexLink, onlyActiveOnIndex property.

Frederic G. MARAND 9 years ago
parent
commit
64df944e17
1 changed files with 2 additions and 2 deletions
  1. 2 2
      modules/App.js

+ 2 - 2
modules/App.js

@@ -1,4 +1,4 @@
-import { Link } from "react-router";
+import { IndexLink, Link } from "react-router";
 import NavLink from './NavLink';
 import React from "react";
 
@@ -8,7 +8,7 @@ export default React.createClass({
       <div>
         <h1>React router tutorial</h1>
         <ul role="nav">
-          <li><Link to="/">Home</Link></li>
+          <li><NavLink onlyActiveOnIndex={true} to="/">Home</NavLink></li>
           <li><NavLink to="/about">About</NavLink></li>
           <li><NavLink to="/repos">Repos</NavLink></li>
         </ul>