code: function isSameRef(x, y) {
    if (x === y) {
      return x !== 0 || y !== 0 || 1 / x === 1 / y
    } else {
      return x !== x && y !== y
    }
  }
docs: adapted from react-redux shallowEqual.js https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js