title: React: useEffect vs useMemo vs useState
body: <p>I was trying to find a concise answer to this on the web without luck.</p>
  
  <p>Is the following correct regarding the differences between <code>useEffect</code>, <code>useMemo</code> and <code>useState</code>?</p>
  
  <ul>
  <li><strong>Both</strong> <code>useState</code> and <code>useMemo</code> will remember a value across renders. The difference is that:
  
  <ul>
  <li><code>useMemo</code> does not cause a re-render, while <code>useState</code> does</li>
  <li><code>useMemo</code> only runs when its dependencies (if any) have changed, while <code>setSomeState</code> (second array item returned by <code>useState</code>) does not have such a dependency array</li>
  </ul></li>
  <li><strong>Both</strong> <code>useMemo</code> and <code>useEffect</code> only runs when their dependencies change (if any). The difference is that:
  
  <ul>
  <li><code>useEffect</code> runs <strong>after</strong> a render happens, while <code>useMemo</code> runs <strong>before</strong></li>
  </ul></li>
  </ul>
  
  <p>Any other key differences I have missed?</p>