Documentation
    Preparing search index...
    • Type Parameters

      Parameters

      • clientInput:
            | string
            | {
                disableMetadataLookup?: boolean;
                encoding?: "json"
                | "cbor"
                | "bare";
                endpoint?: string;
                getUpgradeWebSocket?: GetUpgradeWebSocket;
                headers?: Record<string, string>;
                namespace?: string;
                runnerName?: string;
                token?: string;
            }
            | undefined
      • Optionalopts: CreateRivetKitOptions<Registry>

      Returns {
          useActor: <ActorName extends string | number | symbol>(
              opts: ActorOptions<Registry, ActorName>,
          ) => {
              connection:
                  | ActorConn<ExtractActorsFromRegistry<Registry>[ActorName]>
                  | null;
              error: Error | null;
              handle: ActorHandle<ExtractActorsFromRegistry<Registry>[ActorName]> | null;
              hash: string;
              isConnected?: boolean;
              isConnecting?: boolean;
              isError?: boolean;
              opts: {
                  createInRegion?: string;
                  createWithInput?: unknown;
                  enabled?: boolean;
                  key: string | string[];
                  name: keyof ExtractActorsFromRegistry<Registry>;
                  params?: Record<string, string>;
              };
              useEvent: (eventName: string, handler: (...args: any[]) => void) => void;
          };
      }