title: React Router DOM — How to include a navigation bar on every page?
body: <p>I have this code in my App.js component:</p>
  
  <pre><code>render() {
          return (
              &lt;div&gt;
                  &lt;Navbar/&gt;
                  &lt;BrowserRouter&gt;
                      &lt;Switch&gt;
                          &lt;Route exact path="/" component={Home}/&gt;
                          &lt;Route path="/about" component={About} /&gt;                         
                          &lt;Route path="*" render={() =&gt; &lt;Redirect to="/" /&gt;} /&gt;
                      &lt;/Switch&gt;
                  &lt;/BrowserRouter&gt;
              &lt;/div&gt;
          );
      }
  </code></pre>
  
  <p>Now I tried to include a Link component in one of my other components, but I figured out that the BrowserRouter has to be the root element of the App.js component, in order for that to work. Now I wonder how I would go about making it the route element, if I still want to include the navigation bar on every page.</p>