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:

Parameter Type Description
field StateField<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:

Parameter Type Description
field StateField<T> The state field.
get (value: T) => Input The getter function.

Returns: ExtensionThe extension.