Skip to content

Function: createLocalStorageCommentsStorage()

@roomful/core


@roomful/core / createLocalStorageCommentsStorage

Function: createLocalStorageCommentsStorage()

Section titled “Function: createLocalStorageCommentsStorage()”

createLocalStorageCommentsStorage(roomId): CommentsStorageAdapter

Defined in: packages/core/src/engines/comments-storage.ts:62

A Web Storage–backed CommentsStorageAdapter for zero-server browser durability — comment threads (with their replies and resolved state) survive a reload with no backend. Keyed per room (roomful:<roomId>:comments), versioned, and fails closed. This is the adapter that backs the storage: 'indexeddb' option, so it hydrates full threads through the engine’s own restore path.

string

The room whose threads are persisted (used as the storage key).

CommentsStorageAdapter

A localStorage-backed storage adapter.