@whop/react
Version:
React SDK for building embedded apps on Whop
15 lines (14 loc) • 539 B
TypeScript
import type { WebsocketBroadcastTarget } from "@whop/api";
type BroadcastMessage = {
message: string;
target: WebsocketBroadcastTarget;
};
/**
* A hook that allows you to broadcast a message to the websocket.
*
* When a message is sent before the websocket is connected it is added to a queue and sent once
* the connection is established
* @returns A function that allows you to broadcast a message to the websocket.
*/
export declare function useBroadcastWebsocketMessage(): (message: BroadcastMessage) => void;
export {};