• Custom React hook to obtain a gRPC-web promise client for a specified service. Utilizes ConnectRPC to create a client that can interact with gRPC services. This hook ensures that only one client instance is created per service type, leveraging React's useMemo hook for performance optimization.

    Type Parameters

    Parameters

    • service: T

      The gRPC service type for which the client is created.

    Returns PromiseClient<T>

    A promise client instance for the specified gRPC service.

    Example

    const myServiceClient = usePromiseClient(MyService);
    

Generated using TypeDoc