TinyBase logoTinyBase β

useValues

The useValues hook returns a reactive object reflecting the Values in the Store, and registers a listener so that any changes will update .current.

useValues(storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>): {current: Values}
TypeDescription
storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

The Store to use, or its Id in a Provider context.

returns{current: Values}

A reactive object with a current Values property.

Since

v8.1.0