title: How to get routing working in React.js
body: <p>I'm working on the following <a href="https://github.com/ipatch/crj-frontend" rel="nofollow noreferrer">react project</a>, and am trying to get the relative links in the navbar to work properly.  However, when I click on <em>About Me</em> I get the following response,</p>
  
  <pre><code>Cannot GET /about 
  </code></pre>
  
  <p>The code I am working with looks like the following,</p>
  
  <p><strong>App.js</strong></p>
  
  <pre><code>// This component handles the App template used on every page.
  import React, {PropTypes} from 'react';
  import Header from './common/Header';
  import NavBar from './common/navbar';
  import Router from 'react-router';
  import { Link, IndexLink } from 'react-router';
  
  var navbar = {};
  navbar.brand = {linkTo: "http://chrisrjones.com", text: "chrisrjones.com"};
  navbar.links = [
    // &lt;Link to="/about" activeClassName="active"&gt;About&lt;/Link&gt;
      {linkTo: "/about", text: "About Me"},
      {linkTo: "#", text: "Contact"},
      {dropdown: true, text: "Contribute", links: [
          {linkTo: "#", text: "Sign Up"},
          {linkTo: "#", text: "Login"}
      ]}
  ];
  
  class App extends React.Component {
      render() {
          return (
              &lt;div className="container-fluid"&gt;
                  &lt;NavBar {...navbar}/&gt;
                  &lt;Header/&gt;
                  {this.props.children}
              &lt;/div&gt;
          );
      }
  }
  
  App.propTypes = {
      children: PropTypes.object.isRequired
  };
  
  export default App;
  </code></pre>
  
  <p>Also, to get an idea of what the navbar code looks like you can check out <a href="http://codepen.io/zhaozhiming/pen/LNGyvR" rel="nofollow noreferrer">this codepen</a> that I referenced for the navbar code in my project.</p>