getValue
The getValue function returns a reactive object reflecting the value of a Value in a Store, and registers a listener so that any changes to that Value will update current.
getValue(
valueId: MaybeGetter<string>,
storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): {current: ValueOrUndefined}| Type | Description | |
|---|---|---|
valueId | MaybeGetter<string> | |
storeOrStoreId? | MaybeGetter<undefined | StoreOrStoreId> | |
| returns | {current: ValueOrUndefined} | A reactive object with gettable and settable |
Since Values are mutable leaf values in a Store, the returned object's current property can also be assigned to write back to the Store.
Since
v8.1.0