Shared Counter
React counter buttons sync with a Svelte visual display via RPC.
Click the buttons in the React app — the Svelte display syncs the count with a visual progress bar.
React Counter ──count-change──▷ Host ──count-update──▷ Svelte DisplayInitializing Aiga framework...
How It Works
- The React app manages counter state and renders +1, +5, -1, Reset buttons
- On every state change, it calls
rpcEmit('count-change', { count }) - The host relays to the Svelte display, which renders the count with a colored bar
- All communication goes through Aiga's RPC protocol over postMessage