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

Function useSetValueCallback

src/ui-react/hooks.ts:1079–1095  ·  view source on GitHub ↗
(
  valueId: Id | GetId<Parameter>,
  getValue: (parameter: Parameter, store: Store) => Value | MapValue,
  getValueDeps?: DependencyList,
  storeOrStoreId?: StoreOrStoreId,
  then?: (store: Store, value: Value | MapValue) => void,
  thenDeps?: DependencyList,
)

Source from the content-addressed store, hash-verified

1077 );
1078
1079export const useSetValueCallback: typeof useSetValueCallbackDecl = <Parameter>(
1080 valueId: Id | GetId<Parameter>,
1081 getValue: (parameter: Parameter, store: Store) => Value | MapValue,
1082 getValueDeps?: DependencyList,
1083 storeOrStoreId?: StoreOrStoreId,
1084 then?: (store: Store, value: Value | MapValue) => void,
1085 thenDeps?: DependencyList,
1086): ParameterizedCallback<Parameter> =>
1087 useStoreSetCallback(
1088 storeOrStoreId,
1089 VALUE,
1090 getValue,
1091 getValueDeps,
1092 then,
1093 thenDeps,
1094 valueId,
1095 );
1096
1097export const useDelTablesCallback: typeof useDelTablesCallbackDecl = (
1098 storeOrStoreId?: StoreOrStoreId,

Callers 9

WriterFunction · 0.90
TestFunction · 0.90
useValueStateFunction · 0.90
NubFunction · 0.90
HeaderFunction · 0.90
AddValueFunction · 0.90
CloneValueFunction · 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…