import type { RowData, SvGrid, TableFeatures } from './core' const shallowCompare = (a: unknown, b: unknown) => { if (Object.is(a, b)) return true if (!a || !b || typeof a !== 'object' || typeof b !== 'object') return false const aObj = a as Record const bObj = b as Record const aKeys = Object.keys(aObj) const bKeys = Object.keys(bObj) if (aKeys.length !== bKeys.length) return false return aKeys.every((key) => Object.is(aObj[key], bObj[key])) } /** * Fine-grained subscription to `table.store` using `useSelector` with shallow * comparison. Call from `