title: React Hooks - using useState vs just variables
body: <p>React Hooks give us useState option, and I always see Hooks vs Class-State comparisons. But what about Hooks and some regular variables?</p>
  
  <p>For example, </p>
  
  <pre><code>function Foo() {
      let a = 0;
      a = 1;
      return &lt;div&gt;{a}&lt;/div&gt;;
  }
  </code></pre>
  
  <p>I didn't use Hooks, and it will give me the same results as:</p>
  
  <pre><code>function Foo() {
      const [a, setA] = useState(0);
      if (a != 1) setA(1); // to avoid infinite-loop
      return &lt;div&gt;{a}&lt;/div&gt;;
  }
  </code></pre>
  
  <p>So what is the diffrence? Using Hooks even more complex for that case...So why start using it?</p>