12345678910111213141516171819 |
- import { IndexLink, Link } from "react-router";
- import NavLink from './NavLink';
- import React from "react";
- export default React.createClass({
- render() {
- return (
- <div>
- <h1>React router tutorial</h1>
- <ul role="nav">
- <li><NavLink onlyActiveOnIndex={true} to="/">Home</NavLink></li>
- <li><NavLink to="/about">About</NavLink></li>
- <li><NavLink to="/repos">Repos</NavLink></li>
- </ul>
- { this.props.children }
- </div>
- );
- }
- });
|