Interface: StateNamespace
@roomful/svelte / StateNamespace
Interface: StateNamespace
Section titled “Interface: StateNamespace”Defined in: packages/svelte/src/index.ts:354
Exposes shared-state helpers for the adapter.
Methods
Section titled “Methods”shared()
Section titled “shared()”shared<
T>(key,initialValue,options?): readonly [Writable<T>, (nextValue) =>void]
Defined in: packages/svelte/src/index.ts:364
Creates or reuses a shared-state binding.
Type Parameters
Section titled “Type Parameters”T
The shared state value type.
Parameters
Section titled “Parameters”string
The logical binding key used to reuse the same shared-state engine.
initialValue
Section titled “initialValue”T
The initial shared-state value.
options?
Section titled “options?”Omit<StateOptions<T>, "initialValue">
Optional shared-state configuration overrides.
Returns
Section titled “Returns”readonly [Writable<T>, (nextValue) => void]
A Svelte writable store and setter pair.