title: How can I use Navbar link in Reactjs?
body: <p>I am trying to create a website by using Reactjs. I tried to create Navbar and on navbar, I created 2 links which are Home and Contact. When I click for example contact button, I can see the end-point on URL but on the page, nothing happens. I have already created Routes and Links but I really did not understand why I can not use Navbar's links. May you help me, please? Thank you in advance.</p>
  
  <pre><code>import React from 'react';
  import PropTypes from 'prop-types';
  import {BrowserRouter, Link} from "react-router-dom";
  
  const Navbar = () =&gt; {
       return (
          &lt;BrowserRouter&gt;
              &lt;nav&gt;
                  &lt;ul&gt;
                      &lt;li&gt;&lt;Link to='/'&gt;Sağlık Hizmetim&lt;/Link&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;Link to='/contact'&gt;İletişim&lt;/Link&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/nav&gt;
          &lt;/BrowserRouter&gt;
          );
   };
  
   Navbar.propTypes = {};
  
   export default Navbar;
  </code></pre>
  
  <p>It was my Navbar component.</p>
  
  <pre><code>import React from 'react';
  import {Route,BrowserRouter,Switch} from 'react-router-dom';
  import Contact from "./Contact";
  import Home from './Home';
  
  const Routes = () =&gt; {
       return (
      &lt;BrowserRouter&gt;
          &lt;Switch&gt;
              &lt;Route exact path='/' component={Home}/&gt;
              &lt;Route path='/contact' component={Contact}/&gt;
          &lt;/Switch&gt;
      &lt;/BrowserRouter&gt;
  );
   };
  
   export default Routes;
  </code></pre>
  
  <p>It was my Route component. Also, I have called route and navbar component in App.js.</p>