Usage Patterns
This documents the old v1 API. See Actor Handles for the current version.
Subscriptions (Listening)
Section titled “Subscriptions (Listening)”const unsubscribe = client.on.system.notification((data) => { toast(data.message);});unsubscribe();RPC (Request / Response)
Section titled “RPC (Request / Response)”const user = await client.users.get({ id: "123" });Timeouts
Section titled “Timeouts”Fixed 10-second RPC timeout. If the server never responds, the promise rejects.
Fire-and-forget
Section titled “Fire-and-forget”If the handler returns void, the client method is typed as void:
client.analytics.track({ event: "click" });