bringapp
    Preparing search index...

    Function useSendForm

    • Custom hook for sending form data to a specified URL.

      Type Parameters

      • SuccessT
      • ErrorT
      • PayloadT

      Parameters

      • url: string

        The URL to send the form data to.

      • Optionaloptions: UseSendFormOptions<SuccessT, ErrorT, PayloadT>

        Optional configuration options for handling success and error callbacks.

      Returns {
          data: undefined | SuccessT;
          error: undefined | Error | ErrorT;
          isError: boolean;
          isIdle: boolean;
          isLoading: boolean;
          isSuccess: boolean;
          reset: () => void;
          sendAsync: (payload: PayloadT) => Promise<void>;
          status: Status;
      }

      An object containing the current state and a function to send the form data.

      • data: undefined | SuccessT
      • error: undefined | Error | ErrorT
      • isError: boolean
      • isIdle: boolean
      • isLoading: boolean
      • isSuccess: boolean
      • reset: () => void
      • sendAsync: (payload: PayloadT) => Promise<void>
      • status: Status