title: Hiding common component on Not Found Page in React-Router
body: <p>In my react app, there is a common header which is outside of my Routes and other components are loaded based on routing.</p>
  
  <pre><code>      &lt;React.Fragment&gt;
              &lt;Header /&gt;
              &lt;div className="container dflex"&gt;
                &lt;Switch&gt;
                  &lt;Route path="/money-transfer" component={MoneyTransfer} /&gt;
                  &lt;Redirect from="/" to="/money-transfer" exact /&gt;
                  &lt;Route path="/dmt" exact component={MyDmt} /&gt;
                  &lt;Route component={NoFound} /&gt;
                &lt;/Switch&gt;
            &lt;/div&gt;
        &lt;/React.Fragment&gt;
  </code></pre>
  
  <p>I want to also hide my header when NoFound Page is rendered.
  What can be the best possible solution for this ?</p>