Kottster Packages API Reference
    Preparing search index...

    Function useCallProcedure

    • Hook that returns a function to call server procedures for current page's controller

      Type Parameters

      • TController

      Returns <TProcedure extends string | number | symbol>(
          action: TProcedure,
          ...args: ProcedureInput<TController, TProcedure> extends undefined
              ? []
              : [ProcedureInput<TController, TProcedure>],
      ) => Promise<ProcedureOutput<TController, TProcedure>>

      const callProcedure = useCallProcedure();
      
      import { type Procedures } from './api.server.ts';

      const callProcedure = useCallProcedure<Procedures>();