Accesses the current agent instance.
function AgentComponent() { const agent = useAgent(); // Use agent for interacting with the Internet Computer. return <div>{agent.isLocal() ? 'Local' : 'Remote'}</div>; } Copy
function AgentComponent() { const agent = useAgent(); // Use agent for interacting with the Internet Computer. return <div>{agent.isLocal() ? 'Local' : 'Remote'}</div>; }
Accesses the current agent instance.