MCPcopy
hub / github.com/tinyplex/tinybase / useSetRowCallback

Function useSetRowCallback

src/ui-solid/primitives.ts:758–765  ·  view source on GitHub ↗
(
  tableId: MaybeAccessor<Id> | GetId<Parameter>,
  rowId: MaybeAccessor<Id> | GetId<Parameter>,
  getRow: (parameter: Parameter, store: Store) => Row,
  storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,
  then?: (store: Store, row: Row) => void,
)

Source from the content-addressed store, hash-verified

756 useStoreSetCallback(storeOrStoreId, TABLE, getTable, then, tableId);
757
758export const useSetRowCallback = <Parameter>(
759 tableId: MaybeAccessor<Id> | GetId<Parameter>,
760 rowId: MaybeAccessor<Id> | GetId<Parameter>,
761 getRow: (parameter: Parameter, store: Store) => Row,
762 storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,
763 then?: (store: Store, row: Row) => void,
764): ParameterizedCallback<Parameter> =>
765 useStoreSetCallback(storeOrStoreId, ROW, getRow, then, tableId, rowId);
766
767export const useAddRowCallback = <Parameter>(
768 tableId: MaybeAccessor<Id> | GetId<Parameter>,

Callers 5

WriterFunction · 0.90
primitives.test.tsFile · 0.90
AddRowFunction · 0.90
CloneRowFunction · 0.90
useRowStateFunction · 0.70

Calls 1

useStoreSetCallbackFunction · 0.70

Tested by 1

WriterFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…