title: What is useState() in React?
body: <p>I am currently learning hooks concept in React and trying to understand below example.</p>
  <pre><code>import { useState } from 'react';
  
  function Example() {
      // Declare a new state variable, which we'll call &quot;count&quot;
      const [count, setCount] = useState(0);
  
    return (
      &lt;div&gt;
        &lt;p&gt;You clicked {count} times&lt;/p&gt;
        &lt;button onClick={() =&gt; setCount(count + 1)}&gt;
          Click me
        &lt;/button&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  <p>The above example increments the counter on the handler function parameter itself. What if I want to modify count value inside event handler function</p>
  <p>Consider below example:</p>
  <pre><code>setCount = () =&gt; {
    //how can I modify count value here. Not sure if I can use setState to modify its value
    //also I want to modify other state values as well here. How can I do that
  }
  
  &lt;button onClick={() =&gt; setCount()}&gt;
    Click me
  &lt;/button&gt;
  </code></pre>