Skip to main content


Broadcasting Messages

From any Rem, simply call plugin.messaging.broadcast({anyDataGoesHere: "awesome!"}). This message will be sent to all of your other widgets, who can then receive the message with a listener call:

useOnMessageBroadcast((message) => {

Broadcasting messages can be especially useful if you want to communicate between the callback in keyboard shortcuts/commands registered in the onActivate function in the index widget file and a UI widget component. Eg:

In index.ts:

async function onActivate(plugin: ReactRNPlugin) {
id: 'send-message',
name: 'Send Message',
action: async () => {
await plugin.messaging.broadcast({ anyDataGoesHere: 'awesome!' });

In some widget file:

function Widget() {
useOnMessageBroadcast((message) => {