title: Why React.memo and shouldComponentUpdate aren't doing the same?
body: <p>I have a functional component which has has a connection to an object in my Redux store. To avoid re-renders when the object has changed I added <code>React.memo</code>, however, this didn't avoid the re-renders. My Memo looks something like this: </p>
  
  <pre><code>const MemoizedRadio = React.memo(Radio, (prevProps, nextProps) =&gt; {
    if (prevProps.selected !== nextProps.selected) {
      return false;
    }
    return true;
  });
  
  const mapStateToProps = state =&gt; ({
    nodes: state.canvas.elements.nodes
  });
  
  export default connect(mapStateToProps)(MemoizedRadio);
  </code></pre>
  
  <p>I would expect this component to not re-render if the <code>nodes</code> object has changed, but it does.</p>
  
  <p>When I rewrite my component to a class component and add a shouldComponentUpdate the re-render will be prevented as expected. The shouldComponentUpdate looks as followed:</p>
  
  <pre><code>shouldComponentUpdate(nextProps) {
      if (this.props.selected !== nextProps.selected) {
        return true;
      }
      return false;
    }
  </code></pre>
  
  <p>I thought that <code>React.memo</code> acted the same as <code>shouldComponentUpdate</code> but this does not seem to be the case. The <code>React.memo</code> implementation does always re-render when the reference to the <code>nodes</code> object changes while the <code>shouldComponentUpdate</code> implementation prevents the re-render as expected. </p>
  
  <p>Can anyone explain this behaviour? </p>