BroadcastProvider
<BroadcastProvider channelName="app" options={{ namespace: 'v1' }}> <App /></BroadcastProvider>| Prop | Type | Required | Description |
|---|---|---|---|
channelName |
string |
yes | Channel name. Combined with options.namespace when one is set. |
options |
BroadcastOptions |
no | Identical to the hook’s options, including sourceName, registeredTypes, onMessage, and telemetry. |
children |
ReactNode |
yes | Subtree that shares the channel. |
useBroadcastProvider
Section titled “useBroadcastProvider”const actions = useBroadcastProvider();Returns the BroadcastActions shared by the nearest BroadcastProvider. Throws when called outside one.
The same rules as the hook apply: the tab ignores its own messages, messages is an event log (not current state), and a tab opened later does not receive earlier messages.
