title: Changing text color on click with react hooks
body: <p>I have a simple section where user can click a button, now I want on click to change (toggle) the color of the text using react hooks here is what I have so far.'</p>
  <pre><code>const [textColor, setTextColor] = useState('black');
  
   const handleChnageTextColor = (e) =&gt; {
      setTextColor('#CCCCCC');
  }
  
  return(
  &lt;&gt;
  &lt;label onClick={handleChnageTextColor} className=&quot;switch&quot;&gt;
          &lt;input type=&quot;checkbox&quot; /&gt;
          &lt;span className=&quot;slider round&quot; /&gt;
  &lt;/label&gt;
  
   &lt;small style={{ color:textColor}} className=&quot;switch-container_text&quot;&gt;advanced view&lt;/small&gt;
  &lt;/&gt;
  )
  </code></pre>
  <p>so the initial color is black on click I am changing color to <code>#CCCCCC</code> now when I click again the color is not changing.</p>
  <p>What do I need to add to make this toggle between these two colors on click?</p>