title: How to hide header component in login page reactJS
body: <p>Am new to ReactJS. I want to hide header component in Login page and show in inner pages. I have an App.js  I have used ternary operator but not working.</p>
  
  <pre><code>class App extends Component {
      render(){
      let HideHeader = EmployeeLogin ? null : &lt;HeaderNavContainer /&gt;
          return (
              &lt;div&gt;
                  &lt;Router history={history}&gt;
                      &lt;div&gt;                    
                          {HideHeader}
                          &lt;Switch&gt;
                              &lt;Route path="/about" component={About} /&gt;
                              &lt;Route path="/EmployeeLogin" component={EmployeeLogin} /&gt;                        
                              &lt;Route path="/MyPreferences" component={MyPreferences} /&gt;                        
                              &lt;Route component={PageNotFound} /&gt;
                          &lt;/Switch&gt;    
                      &lt;/div&gt;    
                  &lt;/Router&gt;
              &lt;/div&gt;
          );
      }
  }
  </code></pre>
  
  <p>If EmployeeLogin component is rendered I want to hide header navigation
   <code>&lt;HeaderNavContainer /&gt;</code> if not  I want to show <code>&lt;HeaderNavContainer /&gt;</code></p>