Skip to content

Interface: StateOptions\<T\>

@roomful/core


@roomful/core / StateOptions

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

Configures shared state creation.

T

The shared state value type.

initialValue: T

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

Seeds the shared state value when the room starts.


optional merge: (a, b) => T

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

Resolves conflicts for custom merge strategies.

T

T

T


optional persist: boolean

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

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


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

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

Chooses the state synchronization strategy.