title: How to return 404 status code when URL does not match at ReactJS
body: <p>I use react router v4. So i am trying to return (IF it is possible) a status code 404 at the headers my code is here</p>
  
  <pre><code>export default class App extends Component {
    displayName = App.name
  
  render() {
      return (
          &lt;Layout&gt;
              &lt;Switch&gt;
                  &lt;Route exact path='/' component={Home} /&gt;
                  &lt;Route path='/sitemap/:S' component={SiteMap} /&gt;
                  &lt;Route path='/videos' component={Videos} /&gt;
                  &lt;Route path='/contact' component={Contact} /&gt;
                  &lt;Route path='/privacy' component={Privacy} /&gt;
                  {/*&lt;Route path='/errorpage' component={Error404} status={404} /&gt;*/}
                  &lt;Route component={Error404}/&gt;
              &lt;/Switch&gt;
        &lt;/Layout&gt;
      );
    }
  }
  </code></pre>