import { use, useCallback } from "react"; import { DbContext } from "../contexts/Db.js"; import type { DbInterface } from "../../db/types/DbInterface.js"; import type { Store } from "../store/store.js"; import { useStore } from "../store/react.js"; export function useAction
(
action: (...params: [...P, { db: DbInterface; store: Store }]) => Promise