title: REACTJS giving the following error: TypeError: navigate.push is not a function
body: <p>I am trying to implement a home page for my react.js website. My layout is fine and my code compiles without problems.<br></p>
  <p>However when I click my button I am getting the following error on the website application: <code>TypeError: navigate.push is not a function</code> on the line that says     <code>navigate.push(&quot;/quiz&quot;)</code><br></p>
  <p>I am new to react and if anyone can help me I would be greatful! <br></p>
  <p>Here is my code:</p>
  <pre><code>import { Button } from &quot;@material-ui/core&quot;;
  import { Container } from &quot;@material-ui/core&quot;;
  import { useNavigate } from &quot;react-router-dom&quot;;
  import &quot;./Home.css&quot;;
  
  const Home = () =&gt; {
    const navigate = useNavigate();
  
    const sendSubmit = () =&gt; {
      navigate.push(&quot;/quiz&quot;);
    };
    return (
      &lt;Container className=&quot;content&quot;&gt;
        &lt;h1 id=&quot;quiz-title&quot;&gt;Phishing Quiz&lt;/h1&gt;
        &lt;h2 class=&quot;question-text&quot;&gt;
          Do you think you can beat our phishing quiz?
        &lt;/h2&gt;
        &lt;p className=&quot;description&quot;&gt;
          {&quot; &quot;}
          There are many social engineering attacks on internet however not all of
          them are good enough to trick users. However there are some scams that
          are identical to original websites and usually most of the users get
          tricked by them.
        &lt;/p&gt;
        &lt;p className=&quot;description&quot;&gt;
          Do you think you are smart enough to handle these attacks?
        &lt;/p&gt;
        &lt;p className=&quot;description&quot;&gt;
          We are challenging you with our phishing quiz which will show you
          examples of really good social engineering attacks on internet. We hope
          you can pass!
        &lt;/p&gt;
        &lt;p&gt;&quot;&quot;&lt;/p&gt;
        &lt;Button
          className=&quot;button&quot;
          variant=&quot;contained&quot;
          color=&quot;primary&quot;
          size=&quot;large&quot;
          onClick={sendSubmit}
        &gt;
          Start Quiz
        &lt;/Button&gt;
      &lt;/Container&gt;
    );
  };
  
  export default Home;
  
  </code></pre>