surfaceHost
function surfaceHost(platform, opts): SurfaceHost;Create a single-slot SurfaceHost over platform.embedSurface. Use it when a host renders one
embedded surface and swaps its params as the user’s selection changes.
Parameters
Section titled “Parameters”platform
Section titled “platform”Pick<Platform, "embedSurface">
Returns
Section titled “Returns”Example
Section titled “Example”const invoices = surfaceHost(platform, { providerId: "billing", surfaceName: "invoice-list", mount, onError: (e) => platform.log("warn", "invoice surface failed", { code: e.code }),});invoices.render({ customerEmail }); // embeds, then updates on every later call