title: React Router display one component for all routes ( a header)
body: <p>Have a question regarding react router. </p>
  
  <p>I have a header item that I would like to display for all routes. And of course, I want this to be part of the  so that the user can click items from a nav.    </p>
  
  <p>Currently I have my <code>&lt;Header /&gt;</code> outside of my <code>&lt;Router&gt;</code> and I guess this isn´t working since my router then don't know to re-render?  </p>
  
  <pre><code>import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
    &lt;div&gt;
      &lt;Header /&gt;
      &lt;Router&gt;
        &lt;Switch&gt;
          &lt;Route exact path="/" component={Posts} /&gt;
          &lt;Route exact path="/:category/:postId" component={PostDetails} /&gt;
          &lt;Route path="/:category" component={CategoryView} /&gt;
        &lt;/Switch&gt;
      &lt;/Router&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>And my header has for example a <code>&lt;Link to="/"&gt;LOGO&lt;/Link&gt;</code></p>