valuesEqual()
valuesEqual(
a:unknown,b:unknown):boolean
Defined in: packages/core/src/utils/optionsEqual.ts:24
Structural equality for QueryManagerOptions values. Arrays and plain objects are
compared by value; everything else — functions, class instances, Maps, Dates — by
identity.
That split is what makes an options object rebuilt on every render compare equal as long as
its data did not change, which is the entire point: a caller that passes object literals
(fields={[...]}, translations={{...}}) hands a fresh identity to every reconfigure, so an
identity-only comparison would report a change every time.
Comparing functions by identity is deliberate rather than a limitation. Two functions cannot
be proven equivalent, so a caller that rebuilds getDefaultValue per render must either
memoize it or accept the reconfigure.
Parameters
| Parameter | Type |
|---|---|
a | unknown |
b | unknown |
Returns
boolean
API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.