title: React.memo with isEqual method from lodash incompatible?
body: <p>I'm trying to convert my components to be used with React.memo.
  the problem that some of my components has object or array props which I would like to deeply compare.</p>
  
  <p>Looking at react docs for memo, I can pass a function to do the comparing.</p>
  
  <p>I have provided it with lodash isEqual deep comparison method and it didnt work sometimes.</p>
  
  <p>I think there is some issue with isEqual when it tries to compare a react component with children prop inside.</p>
  
  <p>Example of React children structure:
  <img src="https://i.imgur.com/k8MVPIe.png?1" alt="example" title="example"></p>
  
  <p>Running lodash isEqual between two children objects returns false even if they are completely the same.</p>
  
  <p>I would like to find a way to keep using lodash isEqual as it is working great with any other type of structure, but maybe modify it to work with childrens too.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!!!</p>
  
  <p>PS - Im running the lodash method like this:</p>
  
  <pre><code>const component = React.memo((props) =&gt; {
  ...code here with children usage..
  }, (oldProps, newProps) =&gt; _.isEqual(oldProps, newProps)
  </code></pre>