@ably/chat - v0.8.0
    Preparing search index...

    Interface ChatRoomProviderProps

    Props for the ChatRoomProvider component.

    interface ChatRoomProviderProps {
        attach?: boolean;
        children?: ReactNode | ReactNode[];
        name: string;
        options?: RoomOptions;
        release?: boolean;
    }
    Index

    Properties

    attach?: boolean

    Set to false to disable auto-attaching the room when component mounts and auto-detaching when it unmounts.

    If set to false, you must manually attach and detach the room using room.attach() and room.detach() or the provided shortcut functions that useRoom provides. Setting this flag to false is useful in the case where you have more providers for the same room, and you need to control the attachment manually or by choosing which provider handles it.

    true

    children?: ReactNode | ReactNode[]

    Children nodes.

    name: string

    The name of the room.

    options?: RoomOptions

    Overriding options to use when creating the room.

    NOTE: This value is not memoized by the provider. It must be memoized in your component to prevent re-renders of a parent component from causing the room to be recreated.

    release?: boolean

    Set to false to disable auto-releasing the room when component unmounts, to support multiple ChatRoomProviders for the same room.

    If set to false, you must manually release the room using chatClient.rooms.release(id) or have another ChatRoomProvider for the same room and release set to true.

    true