title: 404 page in React renders in every page
body: <p>I have a Route file which contains multiple routes like this</p>
  
  <pre><code>const RouteUI = ({context}) =&gt;
    &lt;Switch&gt;
    &lt;React.Fragment&gt;
  
      &lt;SDPRouteUI context={context} /&gt;
  
      &lt;SDPMRouteUI context={context} /&gt;
  
      &lt;ACRouteUI context={context} /&gt;
  
      &lt;DCRouteUI context={context} /&gt;
  
      &lt;Route path=""
        render={() =&gt;
          &lt;NotFound context={context} /&gt;
        }
      /&gt;
  
    &lt;/React.Fragment&gt;
  
    &lt;/Switch&gt;
  </code></pre>
  
  <p>The NotFound component is getting rendered on every page,even though it is inside switch.</p>
  
  <p>SDPRouteUI,SDPMRouteUI..etc are other route files like</p>
  
  <pre><code>const SDPRouteUI = ({context}) =&gt;
    &lt;Switch&gt;
      &lt;Route exact path='/sdp/account'
        render={() =&gt;
          &lt;SDPAccountPageSF context={context} /&gt;
        }
      /&gt;
  
      &lt;Route exact path='/sdp/activate/back'
        render={() =&gt;
          &lt;SDPActivateBackSF context={context} /&gt;
        }
      /&gt;
  &lt;Switch&gt;
  </code></pre>