Skip to content

Interface: CommentsOptions

@roomful/solid


@roomful/solid / CommentsOptions

Defined in: core/dist/types.d.ts:1769

Configures the comments engine.

optional restEndpoint: string

Defined in: core/dist/types.d.ts:1783

The REST endpoint used when storage is 'rest'. Threads are loaded from it on init and mutations are POSTed back to it.


optional storage: "memory" | "indexeddb" | "rest"

Defined in: core/dist/types.d.ts:1778

Selects the storage backend.

  • 'memory' (default) — the synced, in-room collaborative structure.
  • 'indexeddb' — additionally persists threads to the browser so they reload on the next session.
  • 'rest' — additionally mirrors threads to a REST endpoint.

optional storageAdapter: CommentsStorageAdapter

Defined in: core/dist/types.d.ts:1791

A custom durable CommentsStorageAdapter. When set, threads are restored from it on startup (into an otherwise-empty room) and saved after every change, so comments survive reconnects and reloads. Use this with the default storage: 'memory' to back comments with Postgres, SQLite, or any store; see docs/reference/comments-storage.md.