SmartDevicesManager.on(event: "change", handler: (event: { type: string; [key: string]: any }) => void)
Requires:
@ray-js/panel-sdk≥1.16.0
Description
Subscribe to multi-device manager change events. Inside SdmProvider, multi-device Hooks are already refreshed via the change event, so manual listeners are usually unnecessary. Use only to observe device state changes outside the Provider (e.g., global logging, non-React components).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
event | "change" | Yes | Event name, fixed to change |
handler | (event: { type: string; [key: string]: any }) => void | Yes | Event callback |
Return Value
Type: any
The current Manager instance; supports chaining