UNPKG

@empathyco/x-components

Version:
33 lines (19 loc) 1.06 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [StateSelector](./x-components.stateselector.md) &gt; [filter](./x-components.stateselector.filter.md) ## StateSelector.filter() method Asserts if the event should really be emitted taking into account the new and old values and the module state. **Signature:** ```typescript filter?(newValue: ReturnType, oldValue: ReturnType, state: State): boolean; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | newValue | ReturnType | The new value. | | oldValue | ReturnType | The old value. | | state | State | The state of the [XModule](./x-components.xmodule.md) where this selector is used. | **Returns:** boolean True if the value has really changed. ## Remarks This function exist because Vue will not stop reactivity propagation if the observed variable is an `object`<!-- -->, an `Array`<!-- -->, or the `deep` mode has been enabled.