ic-reactor
    Preparing search index...

    Interface UseMethodReturnType<A, M>

    interface UseMethodReturnType<
        A,
        M extends types.FunctionName<A> = types.FunctionName<A>,
    > {
        loading: boolean;
        isLoading: boolean;
        isFormRequired: boolean;
        requestKey: string;
        error: undefined | utils.agent.AgentError;
        data: undefined | types.ActorMethodReturnType<A[M]>;
        validateArgs: (args?: types.ActorMethodParameters<A[M]>) => boolean;
        visit: types.VisitService<A>[M];
        reset: () => void;
        call: (
            eventOrReplaceArgs?:
                | MouseEvent<Element, MouseEvent>
                | types.ActorMethodParameters<A[M]>,
        ) => Promise<undefined | types.ActorMethodReturnType<A[M]>>;
    }

    Type Parameters

    Index

    Properties

    loading: boolean

    Use isLoading instead. Indicates whether the method call is in progress.

    isLoading: boolean

    Indicates whether the method call is in progress.

    isFormRequired: boolean

    Indicates whether the argument form is required for the method.

    requestKey: string

    A unique key representing the current request instance.

    error: undefined | utils.agent.AgentError

    The error that occurred during the method call, if any.

    data: undefined | types.ActorMethodReturnType<A[M]>

    The data returned from the method call, or undefined if not yet available.

    validateArgs: (args?: types.ActorMethodParameters<A[M]>) => boolean

    Validates the provided arguments against the method signature.

    Type declaration

    The visit service function corresponding to this method.

    reset: () => void

    Resets the method state (data, error, loading) to initial values.

    call: (
        eventOrReplaceArgs?:
            | MouseEvent<Element, MouseEvent>
            | types.ActorMethodParameters<A[M]>,
    ) => Promise<undefined | types.ActorMethodReturnType<A[M]>>

    Invokes the method.

    Type declaration