Skip to content

Facet.from method

Facet › from

Official

Shorthand method for registering a facet source with a state field as input.

Signature:

from(field: StateField<T>): Extension

Parameters:

ParameterTypeDescription
fieldStateField<T>The state field.

Returns: ExtensionThe 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): Extension

Parameters:

ParameterTypeDescription
fieldStateField<T>The state field.
get(value: T) => InputThe getter function.

Returns: ExtensionThe extension.