ic-reactor
    Preparing search index...

    Variable useActorStateConst

    useActorState: () => UseActorStateReturnType = ActorHooks.useActorState

    Hook for accessing the current state of the actor, including the canister ID.

    Type declaration

    function ActorStateComponent() {
    const { canisterId, initializing, error, initialized } = useActorState();

    return (
    <div>
    <p>Canister ID: {canisterId}</p>
    <p>Initializing: {initializing.toString()}</p>
    <p>Initialized: {initialized.toString()}</p>
    <p>Error: {error?.message}</p>
    </div>
    );
    }