Skip to main content

Intro


This tutorial builds two Custom Apps that communicate in real time using App Broadcasting. You’ll create:
  1. Selector App — A data table that publishes a selection:changed event whenever a user clicks a row
  2. Detail App — A panel that subscribes to selection:changed and displays details for the selected record
Along the way you’ll learn:
  • How to declare broadcast channels in manifest.json
  • How to use domo.broadcastState() for sticky messages that survive late mounts
  • How to filter messages by source using domo.onBroadcastFrom()
  • Best practices for topic naming and payload design
Prerequisites: Complete the Setup and Installation guide. You’ll need two app designs published to the same Domo page.

Step 1: Scaffold both apps


Create two separate app projects:
Each produces a Vite + React + TypeScript project ready for Domo development.

Step 2: Configure the Selector App manifest


Open selector-app/manifest.json and add the channels and datasetsMapping properties:
Key decisions:
  • sticky: true — The Detail App might mount after the user has already clicked a row. Sticky ensures it receives the last selection immediately.
  • Topic namingselection:changed uses the namespace:event convention. The namespace groups related topics; the event describes what happened.

Step 3: Build the Selector App component


Replace selector-app/src/App.tsx:

Step 4: Configure the Detail App manifest


Open detail-app/manifest.json:
The Detail App has no datasets of its own — it gets all its data from the Selector App’s broadcast messages.

Step 5: Build the Detail App component


Replace detail-app/src/App.tsx:
Because the Selector App publishes with sticky: true, if the Detail App mounts after a selection has been made, it immediately receives the last value — no waiting for the user to click again.

Step 6: Publish and test


Publish both apps and place them on the same Domo page:
Create a new Dashboard in Domo and add both apps as cards. Click a row in the Selector App — the Detail App updates instantly.

Pattern: Filtering by source


If your page has multiple Selector Apps and you only want to listen to one, use domo.onBroadcastFrom():
You can find an app’s instance ID in the sourceAppId field of any message it sends, or in the App Broadcasting DevTools inspector.

Pattern: Multi-topic coordination


Real apps often use multiple topics. Here’s a Selector App that publishes both selection state and hover events:
The subscriber decides which topics it cares about:

Pattern: One-time initialization


Use domo.onBroadcastOnce() when an app only needs to receive a message once (e.g., initial configuration from a coordinator app):

Error handling


The SDK throws synchronous errors for invalid usage:
Rate-limit errors from the host arrive asynchronously. The SDK logs a warning when messages are being throttled.

Summary


Next steps