import { IObject } from 'interfaces' import { filterObject } from 'utils/objects' import { shallowEqual } from 'utils/hashing' import { getInputDependencies } from 'utils/dependencies' export const getInputsDifferent = ( component: IObject, oldValues: Record, newValues: Record ): boolean => { const inputIds = getInputDependencies(component) const oldDeps = filterObject(oldValues, inputIds) const newDeps = filterObject(newValues, inputIds) const areDifferent = !shallowEqual(oldDeps, newDeps) return areDifferent }