Interface UseRoomReactionsResponse

The response type from the useRoomReactions hook.

interface UseRoomReactionsResponse {
    connectionError?: ErrorInfo;
    connectionStatus: ConnectionStatus;
    reactions?: RoomReactions;
    roomError?: ErrorInfo;
    roomStatus: RoomStatus;
    send: ((params: SendReactionParams) => Promise<void>);
}

Hierarchy (view full)

Properties

connectionError?: ErrorInfo

If there's a connection error it will be available here.

connectionStatus: ConnectionStatus

Provides the connection status of the Ably connection.

reactions?: RoomReactions

Provides access to the underlying RoomReactions instance of the room.

roomError?: ErrorInfo

If there's an error with the room it will be available here.

roomStatus: RoomStatus

Provides the status of the room.

send: ((params: SendReactionParams) => Promise<void>)

A shortcut to the RoomReactions.send method.

Type declaration

    • (params): Promise<void>
    • Send a reaction to the room including some metadata.

      This method accepts parameters for a room-level reaction. It accepts an object

      Parameters

      • params: SendReactionParams

        an object containing {type, headers, metadata} for the room reaction to be sent. Type is required, metadata and headers are optional.

      Returns Promise<void>

      The returned promise resolves when the reaction was sent. Note that it is possible to receive your own reaction via the reactions listener before this promise resolves.