title: React onClick Event in Functional Component
body: <p>I try to add an onClick event, that would show/hide a div in my functional component, can you please help why it doesn't work?</p>
  <pre><code>export default function OnClickFunctionalComponent (){
  
      const [showStatements, setShowStatements] = useState(false);
      const onClick = () =&gt; setShowStatements(true)
  
      return(
          &lt;Button onClick={onClick}&gt; Show All&lt;/Button&gt;
  
          { showStatements ? &lt;AllStatements /&gt; : null }
      )
  }
  
  const AllStatements = () =&gt; (
      &lt;div&gt;
          Some Results
      &lt;/div&gt;
  )
  </code></pre>
  <p>do I use the useState hook incorrectly?</p>