title: React hooks useEffect only on update?
body: <p>If we want to restrict <code>useEffect</code> to run only when the component mounts, we can add second parameter of <code>useEffect</code> with <code>[]</code>.</p>
  
  <pre><code>useEffect(() =&gt; {
    // ...
  }, []);
  </code></pre>
  
  <p>But how can we make <code>useEffect</code> to run only when the moment when the component is updated except initial mount?</p>