TinyBase logoTinyBase β

useRowIdsListener

The useRowIdsListener hook registers a listener that is called whenever the Row Ids in a Table change.

useRowIdsListener(
  tableId: MaybeGetter<IdOrNull>,
  listener: RowIdsListener,
  mutator?: boolean,
  storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): void
TypeDescription
tableIdMaybeGetter<IdOrNull>

The Id of the Table to listen to, or null to listen to any Table.

listenerRowIdsListener

The function to call when Row Ids 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