title: React Hooks - How do I implement shouldComponentUpdate?
body: <p>I know you can tell React to skip an effect by passing an array as an optional second argument.</p>
  
  <p>For example:</p>
  
  <pre><code>useEffect(() =&gt; {
    document.title = `You clicked ${count} times`;
  }, [count]); // Only re-run the effect if count changes
  </code></pre>
  
  <p><strong>But what if i want to control over the comparison? to add my own comparison logic.</strong></p>
  
  <p>I would expect something like <code>React.memo</code> that you can pass a function as a second argument.</p>