Optional
attachSet 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.
Optional
childrenChildren nodes.
The name of the room.
Optional
optionsOverriding 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.
Optional
releaseSet 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
.
Props for the ChatRoomProvider component.