title: Change font-awesome icon onclick reactjs
body: <p>I'm creating a navbar with React. I use burger menu and I want to change the bar menu to times on click currently I have following:</p>
  <pre><code>const {icons, setIcon} = useState('faBars');
  ...
  &lt;FontAwesomeIcon 
     icon={icons}
     onClick={() =&gt; {setIcon({faTimes})}}
  /&gt;
  </code></pre>
  <p>But obviously it doesn't work. I was wondering how can I correct the code.</p>