Files
backstage/plugins/signals
Fredrik Adelöw 3e9b1a4393 add name to the extension
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2024-08-28 09:24:11 +02:00
..
2024-08-28 09:24:11 +02:00
2024-03-19 11:02:32 +05:30
2024-08-27 11:41:57 +00:00
2024-08-27 11:41:57 +00:00

signals

Welcome to the signals plugin!

Signals plugin allows backend plugins to publish messages to frontend plugins.

Getting started

This plugin contains client that can receive messages from the backend. To get started, see installation instructions from @backstage/plugin-signals-node, @backstage/plugin-signals-backend.

To install this signals frontend plugin, please refer the Getting Started Backstage Notifications and Signals documentation section.

Now you can utilize the API from other plugins using the @backstage/plugin-signals-react package or simply by:

import { signalApiRef } from '@backstage/plugin-signals-react';

const signals = useApi(signalApiRef);
const { unsubscribe } = signals.subscribe(
  'myplugin:topic',
  (message: JsonObject) => {
    console.log(message);
  },
);
// Remember to unsubscribe
unsubscribe();