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

Function useHasTableCallback

src/ui-react-inspector/actions/tables.tsx:32–38  ·  view source on GitHub ↗
(storeOrStoreId: StoreOrStoreId | undefined)

Source from the content-addressed store, hash-verified

30} from './common.tsx';
31
32const useHasTableCallback = (storeOrStoreId: StoreOrStoreId | undefined) => {
33 const store = useStoreOrStoreById(storeOrStoreId);
34 return useCallback(
35 (tableId: Id) => store?.hasTable(tableId) ?? false,
36 [store],
37 );
38};
39
40const AddTable = ({onDone, store}: OnDoneProp & TablesProps) => {
41 const has = useHasTableCallback(store);

Callers 2

AddTableFunction · 0.70
CloneTableFunction · 0.70

Calls 2

useStoreOrStoreByIdFunction · 0.90
hasTableMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…