<!-- 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)

## StateSelector interface

Composition type of [SimpleStateSelector](./x-components.simplestateselector.md) which allows to indicate if the state selector should be executed in first instance (first assignment of values). Selector is the [SimpleStateSelector](./x-components.simplestateselector.md) and immediate flags if the selector should be executed when it is initialized for first time.

**Signature:**

```typescript
export interface StateSelector<ReturnType, State extends Dictionary, Getters extends Dictionary> extends WatchOptions 
```
**Extends:** WatchOptions

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [metadata?](./x-components.stateselector.metadata.md) |  | Partial&lt;[WireMetadata](./x-components.wiremetadata.md)<!-- -->&gt; | _(Optional)_ |
|  [selector](./x-components.stateselector.selector.md) |  | [SimpleStateSelector](./x-components.simplestateselector.md)<!-- -->&lt;ReturnType, State, Getters&gt; |  |

## Methods

|  Method | Description |
|  --- | --- |
|  [filter(newValue, oldValue, state)?](./x-components.stateselector.filter.md) | _(Optional)_ Asserts if the event should really be emitted taking into account the new and old values and the module state. |

