title: ReactJS Route function isn't working for me
body: <p>I started learning ReactJS yesterday using Academind's crash course for beginners on it. There is a part where he teaches about <code>react-router-dom</code>. I tried using it on <code>App.js</code> and <code>index.js</code> as such:</p>
  <p>App.js:</p>
  <pre><code>import { Route } from &quot;react-router-dom&quot;;
  
  import AllMeetupsPage from &quot;./pages/AllMeetups&quot;;
  import FavouritesPage from &quot;./pages/Favourites&quot;;
  import NewMeetupsPage from &quot;./pages/NewMeetups&quot;;
  
  function App() {
    return (
      &lt;div&gt;
        &lt;Route path='/'&gt;
          &lt;AllMeetupsPage /&gt;
        &lt;/Route&gt;
        &lt;Route path='/favourites'&gt;
          &lt;FavouritesPage /&gt;
        &lt;/Route&gt;
        &lt;Route path='/new-meetups'&gt;
          &lt;NewMeetupsPage /&gt;
        &lt;/Route&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  <p>index.js:</p>
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { BrowserRouter } from 'react-router-dom'
  
  import './index.css';
  import App from './App';
  
  ReactDOM.render(
    &lt;BrowserRouter&gt;
      &lt;App /&gt;
    &lt;/BrowserRouter&gt;,
    document.getElementById('root')
  );
  </code></pre>
  <p>There shouldn't be any error since I have fixed the syntax and imported the right files given in the video. Yet, in localhost:3000 I get <a href="https://i.stack.imgur.com/F1OVe.png" rel="nofollow noreferrer">this</a> as the result.</p>
  <p>If I just use <code>&lt;AllMeetupsPage /&gt;</code> then it works. If I put it in the route function then it doesn't. How can I fix this?</p>