import { useClient } from 'hooks/useClient'; import { useQuery } from '@tanstack/react-query'; // A panel, not a screen. It gets whatever space the layout gives it and knows nothing about routing. // // `useClient` comes from the platform's workspace packages, resolved because a plugin lives inside the // repository — no publishing, no version negotiation. This is the whole plugin↔host API in one line. export const ExampleOverview = () => { const client = useClient(); const { data, isLoading } = useQuery({ queryKey: ['example', 'ping'], queryFn: () => client.get<{ plugin: string; ok: boolean }>('/example/ping'), }); return (

Example

A panel from plugins/example/web/, rendered by the shell's WorkspaceView.

GET /api/example/ping
{isLoading ? : {JSON.stringify(data)}}
); };