title: ReactJS- Use slug instead of Id in the URL with React router
body: <p><strong>In short:</strong> I want to show the slug instead of the Id in the URL, whats the best way to do that?</p>
  
  <p>In my app.js component I am using React-router this way so far:</p>
  
  <pre><code> &lt;Router history={browserHistory}&gt;
      &lt;Route path="/" component={Main}&gt;
        &lt;IndexRoute component={Home}&gt;&lt;/IndexRoute&gt;
          &lt;Route path="/profile/:slug" component={Split}&gt;&lt;/Route&gt;
      &lt;/Route&gt;
  
    &lt;/Router&gt;
  </code></pre>
  
  <p>Then in my profile component I am using Link to go to that specific profile via the slug:</p>
  
  <pre><code>&lt;Link to={'/profile/' + username.slug}&gt;{username}&lt;/Link&gt;
  </code></pre>
  
  <p>I was thinking of keying them together in my profile reducer or something?</p>
  
  <p>Any tips would be very helpful!</p>