Skip to main content
Use a document connection helper when your UI needs a live room document. This sits one level below a room connection: first connect to the room, then open the document you want to render or edit.

React

Use useDocumentConnection from @meshagent/meshagent-react:

Flutter

Use DocumentConnectionScope from meshagent_flutter:

What these helpers do

  • open the document from an existing RoomClient
  • keep the connection alive while your component or widget is mounted
  • surface loading or error state back into the UI
  • close the document connection when the UI goes away

When to use this

Use a document connection when your app needs a live, room-backed document surface such as:
  • shared notes
  • thread documents
  • structured room content
For the lower-level runtime model behind these helpers, see Sync / Documents.