Shopify App Bridge introduces a new concept of actions. An action provides a way for applications and hosts to trigger events with a payload.
All other example code should function as-is.
Simple actionsAnchor link to section titled "Simple actions"
Simple actions can be dispatched by both hosts (e.g. the Shopify admin or Shopify POS) and apps. Here is an example of a simple action in an app:
Action setsAnchor link to section titled "Action sets"
Action sets are grouped simple actions created and used by apps. They are generated with a unique ID and provide the additional capability for apps to subscribe directly to them. They can be thought of as a persisted set of actions that can be dispatched/subscribed to at any time. Here is an example of a Toast action set: