title: React Router Dom Link in another component
body: <p>I'm quite new to React in general so I apologise in advance if there is a simple solution.</p>
  
  <p>I have two components:<br></p>
  
  <p>Dashboard<br>
  --Sidebar (Called in Dashboard)</p>
  
  <p>I have a path set up in Dashboard, and Links in my Sidebar. When I click a link the URL changes, but the Dashboard doesn't re-render, so it only changes on a page refresh. My question is, is there a way through react-router that I can set my Dashboard to re-render on click of a Link in Sidebar?</p>
  
  <p>Import</p>
  
  <pre><code>import { BrowserRouter, Route, Link } from 'react-router-dom';
  </code></pre>
  
  <p>Dashboard Component:</p>
  
  <pre><code>&lt;DashboardSidebar /&gt;
  &lt;BrowserRouter&gt;
      &lt;div&gt;
          &lt;Route exact path="/" component={DashboardLanding} /&gt;
          &lt;Route path="/profile" component={ViewUsers} /&gt;
          &lt;Route path="/project" component={ViewProjects} /&gt;
      &lt;/div&gt;
  &lt;/BrowserRouter&gt;
  </code></pre>
  
  <p>Dashboard Sidebar Component</p>
  
  <pre><code>&lt;BrowserRouter&gt;
      &lt;Link
          to="/"
          className="nav-link" 
          onClick={this.navigation} 
      &gt;
      Link&lt;/Link&gt;
      &lt;Link
          to="/profile"
          className="nav-link" 
          onClick={this.navigation} 
      &gt;
      Link&lt;/Link&gt;
      &lt;Link
          to="/project"
          className="nav-link" 
          onClick={this.navigation} 
      &gt;
      Link&lt;/Link&gt;
  &lt;BrowserRouter&gt;
  </code></pre>