MCPcopy Index your code
hub / github.com/tinyplex/tinybase / useHasValueCallback

Function useHasValueCallback

src/ui-react-inspector/actions/values.tsx:24–30  ·  view source on GitHub ↗
(storeOrStoreId: StoreOrStoreId | undefined)

Source from the content-addressed store, hash-verified

22} from './common.tsx';
23
24const useHasValueCallback = (storeOrStoreId: StoreOrStoreId | undefined) => {
25 const store = useStoreOrStoreById(storeOrStoreId);
26 return useCallback(
27 (valueId: Id) => store?.hasValue(valueId) ?? false,
28 [store],
29 );
30};
31
32const AddValue = ({onDone, store}: OnDoneProp & ValuesProps) => {
33 const has = useHasValueCallback(store);

Callers 2

AddValueFunction · 0.70
CloneValueFunction · 0.70

Calls 2

useStoreOrStoreByIdFunction · 0.90
hasValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…