title: Using <Link> doesn't refresh the page, but modifying the url does
body: <p>I'm following a tutorial on React, and everything seems to work without problem in the video. However, clicking on the link doesn't work for me, it changes the url but doesn't change the content.
  Most, if not all of the solutions are workarounds, and are a few years old. The few that I tried didn't work.
  Edit: I don't know if it's important, but I'm using yarn.</p>
  <p>This is the basic navigation bar</p>
  <pre><code>import {BrowserRouter, Link} from &quot;react-router-dom&quot;;
  
  
  function  MainNavigation() {
      return &lt;header&gt;
          &lt;div&gt;React&lt;/div&gt;
          &lt;nav&gt;
              &lt;ul&gt;
                  &lt;BrowserRouter&gt;
                      &lt;li&gt; &lt;Link to='/'  &gt;All Meetups&lt;/Link&gt; &lt;/li&gt;
                      &lt;li&gt; &lt;Link to='/new'  &gt;New Meetup&lt;/Link&gt; &lt;/li&gt;
                      &lt;li&gt; &lt;Link to='/favorites'  &gt;Favorites&lt;/Link&gt; &lt;/li&gt;
                  &lt;/BrowserRouter&gt;
              &lt;/ul&gt;
          &lt;/nav&gt;
      &lt;/header&gt;
  }
  
  export default MainNavigation;
  </code></pre>
  <p>This is the App.js file</p>
  <pre><code>import {BrowserRouter, Route, Switch} from &quot;react-router-dom&quot;;
  
  import AllMeetupsPage from &quot;./pages/AllMeetups&quot;;
  import FavoritesPage from &quot;./pages/Favorites&quot;;
  import NewMeetupPage from &quot;./pages/NewMeetup&quot;;
  import MainNavigation from &quot;./components/layout/MainNavigation&quot;;
  
  
  function App() {
    return (
        &lt;div&gt;
            &lt;BrowserRouter&gt;
                &lt;MainNavigation /&gt;
                &lt;Switch&gt;
                    &lt;Route path='/' component={AllMeetupsPage}  exact={true} /&gt;
                    &lt;Route path='/favorites' component={FavoritesPage} /&gt;
                    &lt;Route path='/new' component={NewMeetupPage} /&gt;
                &lt;/Switch&gt;
            &lt;/BrowserRouter&gt;
        &lt;/div&gt;
    );
  
  }
  
  export default App;
  
  </code></pre>