Rooms act like folders. Anything you update in a room is shared with everyone in the room by default over WebSocket. You might create a Room for a customer, a team, a project, a document, or whatever you want.

To create a room, first setup your Auth Webhook. Then, create a client:

1import { RoomService } from "@roomservice/browser"
3const service = new RoomService({
4 auth: "/your/auth/webhook"

Then, create a new Room:

1const room ="myteam")

By default, a Room will attempt to connect to the WebSocket. If for any reason you need to disconnect and reconnect, that's possible:

1await room.disconnect()
2await room.reconnect()