function shallowCompare(instance, nextProps, nextState) {
  return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
Does a shallow comparison for props and state.
See ReactComponentWithPureRenderMixin
See also https://facebook.github.io/react/docs/shallow-compare.html