App.js 506 B

12345678910111213141516171819
  1. import { IndexLink, Link } from "react-router";
  2. import NavLink from './NavLink';
  3. import React from "react";
  4. export default React.createClass({
  5. render() {
  6. return (
  7. <div>
  8. <h1>React router tutorial</h1>
  9. <ul role="nav">
  10. <li><NavLink onlyActiveOnIndex={true} to="/">Home</NavLink></li>
  11. <li><NavLink to="/about">About</NavLink></li>
  12. <li><NavLink to="/repos">Repos</NavLink></li>
  13. </ul>
  14. { this.props.children }
  15. </div>
  16. );
  17. }
  18. });