title: Reactjs - React Router disallowing paths
body: <p>I have a route</p>
  
  <pre><code>&lt;Route exact path="/view/:personID" component={PersonView} /&gt;
  </code></pre>
  
  <p>It works fine, however /view still renders, albeit with no person in it. Is there a way to disallow this path or turn in into a 404?</p>
  
  <p>Answer was to use switch</p>
  
  <pre><code>&lt;Switch&gt;
    &lt;Route exact path="/view/:personID" component={PersonView} /&gt;
    &lt;Redirect from='/view' to='/' /&gt;
  &lt;/Switch&gt;
  </code></pre>