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

Function useValueState

src/ui-solid/primitives.ts:735–741  ·  view source on GitHub ↗
(
  valueId: MaybeAccessor<Id>,
  storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,
)

Source from the content-addressed store, hash-verified

733 );
734
735export const useValueState = (
736 valueId: MaybeAccessor<Id>,
737 storeOrStoreId?: MaybeAccessor<StoreOrStoreId | undefined>,
738): [Accessor<ValueOrUndefined>, (value: Value) => void] => [
739 useValue(valueId, storeOrStoreId),
740 useSetValueCallback(valueId, getArg, storeOrStoreId),
741];
742
743export const useSetTablesCallback = <Parameter>(
744 getTables: (parameter: Parameter, store: Store) => Tables,

Callers 3

StateFunction · 0.90
primitives.test.tsFile · 0.90
EditableValueViewFunction · 0.90

Calls 2

useValueFunction · 0.70
useSetValueCallbackFunction · 0.70

Tested by 1

StateFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…