Skip to content

StateFieldSpec.compare method

StateFieldSpec › compare

Compare two values of the field, returning true when they are the same. This is used to avoid recomputing facets that depend on the field when its value did not change. Defaults to using ===.

Signature:

compare(a: Value, b: Value): boolean

Parameters:

ParameterTypeDescription
aValueThe first value to compare.
bValueThe second value to compare.

Returns: booleantrue if the values are the same, false otherwise.