title: reactjs - Handling custom 404 page
body: <p>I am trying to create a route that would catch all the invalid URL's and then display my custom 404 page to user without Admin Layout. My problem is, that my 404 page always displays the Admin Layout (even if the User is not logged in). I have these routes in my <em>routes.js</em>:</p>
  
  <pre><code>export default [
   &lt;Switch&gt;
     &lt;Route exact path="/password-reset" component={ResetPassword} noLayout /&gt;,
     &lt;Route exact path="*" component={NotFound} noLayout/&gt;
   &lt;/Switch&gt;
  ];
  </code></pre>
  
  <p>I have added this bit to the Admin component in my <em>App.js</em>:</p>
  
  <pre><code>const App = () =&gt; (
  
  &lt;Admin
      catchAll=         {NotFound}
      customRoute=      {routes}
  &gt;
  &lt;/Admin&gt;
  );
  </code></pre>
  
  <p>Any idea how to handle the 404 page so it would catch all the invalid URL's and wouldnt display the Admin Layout?</p>
  
  <p>Thank you in advance. </p>