title: Getting the currently matched route
body: <p>I have a waiting list page that can be accessed via following routes</p>
  
  <pre><code>example.com/waiting-list
  example.com/waiting-list/success/:email
  example.com/waiting-list/ref/:ref_code
  </code></pre>
  
  <p>In each case I need to display correct UI, hence need a way of checking what case/url the page is accessed from. I can't seem to be able and find this in docs :/ <a href="https://github.com/reactjs/react-router" rel="nofollow">https://github.com/reactjs/react-router</a></p>
  
  <p>Routes:</p>
  
  <pre><code>&lt;Route path='/waiting-list' component={WaitingListPage} /&gt;
  &lt;Route path='/waiting-list/ref/:ref_code' component={WaitingListPage} /&gt;
  &lt;Route path='/waiting-list/success/:ref_code' component={WaitingListPage} /&gt;
  </code></pre>
  
  <p>Since all routes lead to the same component (<code>WaitingListPage</code>), and because the view will differ slightly depending on the matched route, I need to find out within the <code>WaitingListPage</code> component which of one the 3 routes were matched.</p>