TinyBase logoTinyBase β

useRow

The useRow hook returns a reactive object reflecting a Row in a Table, and registers a listener so that any changes to that Row will update .current.

useRow(
  tableId: MaybeGetter<string>,
  rowId: MaybeGetter<string>,
  storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): {current: Row}
TypeDescription
tableIdMaybeGetter<string>

The Id of the Table (or a getter returning it).

rowIdMaybeGetter<string>

The Id of the Row (or a getter returning it).

storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

The Store to use (plain value or getter), or its Id.

returns{current: Row}

A reactive object with a current Row property.

Since

v8.1.0