modules/core/src/lifecycle/props.js
function diffDataProps(props, oldProps) {
  if (oldProps === null) {
    return 'oldProps is null, initial diff';
  }

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

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

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

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