title: Usecase for useMemo hook
body: <p>Looking at React's <code>useMemo</code> <a href="https://reactjs.org/docs/hooks-reference.html#usememo" rel="nofollow noreferrer">documentation</a>. They say to use it when you need to compute an expensive calculation.</p>
  
  <blockquote>
    <p>This optimization helps to avoid expensive calculations on every render.</p>
  </blockquote>
  
  <p>I looked at the <code>memoized</code> <a href="https://en.wikipedia.org/wiki/Memoization" rel="nofollow noreferrer">link</a> they provide and what I understood is that you can think of it like an cache. </p>
  
  <p>I'm not an expert at computer science, but I know that memoization is a good  optimization for calculating <a href="https://stackoverflow.com/questions/7875380/recursive-fibonacci-memoization">fibonacci</a></p>
  
  <p>I'm still trying to understand better why and how to use <code>useMemo</code>, but a few things are still unclear to me.</p>
  
  <ul>
  <li>What is considered <code>expensive calculations</code>?  </li>
  <li>Can someone give real <code>react</code> examples?   </li>
  <li>In what cases <code>useMemo</code> is good for performance optimization?</li>
  </ul>