Skip to content
Roomful is in public beta — install with the @beta tag. Share feedback →

Interface: StateOptions\<T\>

@roomful/core


@roomful/core / StateOptions

Defined in: packages/core/src/types.ts:866

Configures shared state creation.

T

The shared state value type.

initialValue: T

Defined in: packages/core/src/types.ts:870

Seeds the shared state value when the room starts.


optional merge: (a, b) => T

Defined in: packages/core/src/types.ts:885

Resolves conflicts for custom merge strategies.

T

T

T


optional persist: boolean

Defined in: packages/core/src/types.ts:880

Persists local last-writer-wins state between sessions when true.


optional strategy: "lww" | "crdt" | "custom"

Defined in: packages/core/src/types.ts:875

Chooses the state synchronization strategy.