title: How do you go to another page on button click in react?
body: <p>FYI I'm learning reactjs.
  I have a quick question. I am developing a restaurant website and I want to make my &quot;View Full Menu&quot; button on my homepage(Home.js) take me to my menu.js file. I was able to redirect to the menu page on my App.js file, which is essentially where I have my functional navbar components. Please let me know if I need to show more code for this question.
  Also, I know that I probably have to use &quot;onClick&quot; on the button, but after doing some research, I cannot figure out how to go to the menu.js page. Thank you in advance.</p>
  <pre><code>            &lt;div&gt;
                  &lt;Card className=&quot;text-center&quot;&gt;
                      &lt;Card.Header&gt;Featured&lt;/Card.Header&gt;
                      
                      &lt;Card.Body&gt;
                          &lt;Card.Title&gt;Menu&lt;/Card.Title&gt;
                          &lt;Card.Text&gt;
                              orem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. At consectetur lorem donec massa sapien. Euismod lacinia at quis risus sed vulputate odio ut.
                          &lt;/Card.Text&gt;
                          &lt;Button variant=&quot;primary&quot;&gt;View Full Menu&lt;/Button&gt;
                      &lt;/Card.Body&gt;
                      &lt;Card.Footer className=&quot;text-muted&quot;&gt;&lt;/Card.Footer&gt;
                  &lt;/Card&gt;
              &lt;/div&gt;
  </code></pre>
  <p>Here is my working &quot;menu&quot; button on my App.js file.</p>
  <pre><code>function App () {
    return (
      
      &lt;BrowserRouter&gt;
      &lt;div className=&quot;App&quot;&gt;
        &lt;Navigation /&gt;
        &lt;Routes&gt;
          &lt;Route path=&quot;/&quot; element={&lt;Home /&gt;} /&gt;
          &lt;Route path=&quot;/about&quot; element={&lt;About /&gt;} /&gt;
          &lt;Route path=&quot;/menu&quot; element={&lt;MenuApp /&gt;} /&gt;
          &lt;Route path= &quot;/fire&quot; element={&lt;Fire /&gt;}/&gt;
        &lt;/Routes&gt;
      &lt;/div&gt;
    &lt;/BrowserRouter&gt;
    
    
    );
  }
  </code></pre>