Interface: StateOptions\<T\>
@roomful/core / StateOptions
Interface: StateOptions<T>
Section titled “Interface: StateOptions<T>”Defined in: packages/core/src/types.ts:866
Configures shared state creation.
Type Parameters
Section titled “Type Parameters”T
The shared state value type.
Properties
Section titled “Properties”initialValue
Section titled “initialValue”initialValue:
T
Defined in: packages/core/src/types.ts:870
Seeds the shared state value when the room starts.
merge()?
Section titled “merge()?”
optionalmerge: (a,b) =>T
Defined in: packages/core/src/types.ts:885
Resolves conflicts for custom merge strategies.
Parameters
Section titled “Parameters”T
T
Returns
Section titled “Returns”T
persist?
Section titled “persist?”
optionalpersist:boolean
Defined in: packages/core/src/types.ts:880
Persists local last-writer-wins state between sessions when true.
strategy?
Section titled “strategy?”
optionalstrategy:"lww"|"crdt"|"custom"
Defined in: packages/core/src/types.ts:875
Chooses the state synchronization strategy.