function diffDataProps(props, oldProps) {
  if (oldProps === null) {
    return 'oldProps is null, initial diff';
  }

  let dataChanged = null;
  // Support optional app defined comparison of data
  const {dataComparator, _dataDiff} = props;
  if (dataComparator) {
    if (!dataComparator(props.data, oldProps.data)) {
      dataChanged = 'Data comparator detected a change';
    }
    // Otherwise, do a shallow equal on props
  } else if (props.data !== oldProps.data) {
    dataChanged = 'A new data container was supplied';
  }
  if (dataChanged && _dataDiff) {
    dataChanged = _dataDiff(oldProps.data, props.data) || dataChanged;
  }

  return dataChanged;
}
// the dataComparator should be used if supplied
the dataComparator should be used if supplied
the dataComparator should be used if supplied
function diffDataProps(props, oldProps) {
  if (oldProps === null) {
    return 'oldProps is null, initial diff';
  }
  let dataChanged = null;
  const {dataComparator, _dataDiff} = props;
  if (dataComparator) {
    if (!dataComparator(props.data, oldProps.data)) {
      dataChanged = 'Data comparator detected a change';
    }
  } else if (props.data !== oldProps.data) {
    dataChanged = 'A new data container was supplied';
  }
  if (dataChanged && _dataDiff) {
    dataChanged = _dataDiff(oldProps.data, props.data) || dataChanged;
  }
  return dataChanged;
}
function diffDataProps ( props , oldProps ) { if ( oldProps === null ) { return 'oldProps is null, initial diff' ; } let dataChanged = null ; const { dataComparator , _dataDiff } = props ; if ( dataComparator ) { if ( ! dataComparator ( props . data , oldProps . data ) ) { dataChanged = 'Data comparator detected a change' ; } } else if ( props . data !== oldProps . data ) { dataChanged = 'A new data container was supplied' ; } if ( dataChanged && _dataDiff ) { dataChanged = _dataDiff ( oldProps . data , props . data ) || dataChanged ; } return dataChanged ; }
the dataComparator should be used if supplied
the dataComparator should be used if supplied
// Support optional app defined comparison of data // Otherwise, do a shallow equal on props