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

Function useSetValueCallback

src/ui-solid/primitives.ts:847–853  ·  view source on GitHub ↗
(
  valueId: MaybeAccessor<Id> | GetId<Parameter>,
  getValue: (parameter: Parameter, store: Store) => Value | MapValue,
  storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,
  then?: (store: Store, value: Value | MapValue) => void,
)

Source from the content-addressed store, hash-verified

845 useStoreSetCallback(storeOrStoreId, PARTIAL + VALUES, getPartialValues, then);
846
847export const useSetValueCallback = <Parameter>(
848 valueId: MaybeAccessor<Id> | GetId<Parameter>,
849 getValue: (parameter: Parameter, store: Store) => Value | MapValue,
850 storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,
851 then?: (store: Store, value: Value | MapValue) => void,
852): ParameterizedCallback<Parameter> =>
853 useStoreSetCallback(storeOrStoreId, VALUE, getValue, then, valueId);
854
855export const useDelTablesCallback = (
856 storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,

Callers 5

WriterFunction · 0.90
primitives.test.tsFile · 0.90
AddValueFunction · 0.90
CloneValueFunction · 0.90
useValueStateFunction · 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…