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

Function useSetTablesCallback

src/ui-react/hooks.ts:914–930  ·  view source on GitHub ↗
(
  getTables: (parameter: Parameter, store: Store) => Tables,
  getTablesDeps?: DependencyList,
  storeOrStoreId?: StoreOrStoreId,
  then?: (store: Store, tables: Tables) => void,
  thenDeps?: DependencyList,
)

Source from the content-addressed store, hash-verified

912];
913
914export const useSetTablesCallback: typeof useSetTablesCallbackDecl = <
915 Parameter,
916>(
917 getTables: (parameter: Parameter, store: Store) => Tables,
918 getTablesDeps?: DependencyList,
919 storeOrStoreId?: StoreOrStoreId,
920 then?: (store: Store, tables: Tables) => void,
921 thenDeps?: DependencyList,
922): ParameterizedCallback<Parameter> =>
923 useStoreSetCallback(
924 storeOrStoreId,
925 TABLES,
926 getTables,
927 getTablesDeps,
928 then,
929 thenDeps,
930 );
931
932export const useSetTableCallback: typeof useSetTableCallbackDecl = <Parameter>(
933 tableId: Id | GetId<Parameter>,

Callers 5

WriterFunction · 0.90
TestFunction · 0.90
useTablesStateFunction · 0.90
SettersFunction · 0.50
SettersFunction · 0.50

Calls 1

useStoreSetCallbackFunction · 0.70

Tested by 2

WriterFunction · 0.72
TestFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…