TinyBase logoTinyBase β

useValuesListener

The useValuesListener hook registers a listener that is called whenever any Values in the Store change.

useValuesListener(
  listener: ValuesListener,
  mutator?: boolean,
  storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): void
TypeDescription
listenerValuesListener

The function to call when Values change.

mutator?boolean

An optional boolean indicating the listener mutates Store data.

storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

The Store to use, or its Id.

returnsvoid

This has no return value.

Since

v8.1.0