title: How to use hooks inside a conditional statement?
body: <p>I have a state and I want to increase its value based on an if statement :</p>
  <pre><code>const ChangeQuiz=(e)=&gt;{
   if(e.target.innerHTML === quiz.Correct)
      usePoints(++points);          // I want this to increase its value based on the if statement 
     var toEnd = true;
    useCounter(++counter);
    useQuiz(qizArr[counter]);
  
   }
  </code></pre>
  <p>But its giving me the 'React Hook &quot;usePoints&quot; is called conditionally' message .
  So how can I get around that ??</p>