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

Function useDel

docs/pseudo.esm.sh/tinybase@9.0.0/ui-react/index.js:408–415  ·  view source on GitHub ↗
(storeOrStoreId, deletable, then = getUndefined, thenDeps = EMPTY_ARRAY, ...args)

Source from the content-addressed store, hash-verified

406var argsOrGetArgs = (args, store, parameter) => arrayMap(args, (arg) => isFunction(arg) ? arg(parameter, store) : arg);
407var nonFunctionDeps = (args) => arrayFilter(args, (arg) => !isFunction(arg));
408var useDel = (storeOrStoreId, deletable, then = getUndefined, thenDeps = EMPTY_ARRAY, ...args) => {
409 const store = useStoreOrStoreById(storeOrStoreId);
410 return useCallback(
411 (parameter) => then(store?.[DEL + deletable](...argsOrGetArgs(args, store, parameter))),
412 // eslint-disable-next-line react-hooks/exhaustive-deps
413 [store, deletable, ...thenDeps, ...nonFunctionDeps(args)]
414 );
415};
416var useCheckpointAction = (checkpointsOrCheckpointsId, action, arg) => {
417 const checkpoints = useCheckpointsOrCheckpointsById(
418 checkpointsOrCheckpointsId

Callers 6

useDelTablesCallbackFunction · 0.70
useDelTableCallbackFunction · 0.70
useDelRowCallbackFunction · 0.70
useDelCellCallbackFunction · 0.70
useDelValuesCallbackFunction · 0.70
useDelValueCallbackFunction · 0.70

Calls 3

useStoreOrStoreByIdFunction · 0.70
argsOrGetArgsFunction · 0.70
nonFunctionDepsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…