TinyBase logoTinyBase β

useBindableCell

The useBindableCell hook returns a reactive object reflecting the value of a Cell, with a settable current property that writes back to the Store.

useBindableCell(
  tableId: MaybeGetter<string>,
  rowId: MaybeGetter<string>,
  cellId: MaybeGetter<string>,
  storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): {current: CellOrUndefined}
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).

cellIdMaybeGetter<string>

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

storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

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

returns{current: CellOrUndefined}

A reactive object with gettable and settable current.

Since

v8.1.0