code: function shallowCompare(instance, nextProps, nextState) {
    return (
      !shallowEqual(instance.props, nextProps) ||
      !shallowEqual(instance.state, nextState)
    );
  }
docs: Does a shallow comparison for props and state.
  See ReactComponentWithPureRenderMixin