Facet.from method
Facet › from
Official
Shorthand method for registering a facet source with a state field as input.Signature:
from(field: StateField<T>): ExtensionParameters:
| Parameter | Type | Description |
|---|---|---|
| field | StateField<T> | The state field. |
Returns: Extension — The extension.
Official
Shorthand method for registering a facet source with a state field as input, using a getter function.Signature:
from(field: StateField<T>, get: (value: T) => Input): ExtensionParameters:
| Parameter | Type | Description |
|---|---|---|
| field | StateField<T> | The state field. |
| get | (value: T) => Input | The getter function. |
Returns: Extension — The extension.