import { useContext } from "react"; import { UpdateContextValue, UpdateProviderContext } from "./UpdateProvider"; export function useUpdater() : UpdateContextValue { const context = useContext(UpdateProviderContext); if (!context) { throw new Error("useUpdater must be used within an UpdateProvider"); } return context; }