Skip to content

Interface: StateNamespace

@roomful/svelte


@roomful/svelte / StateNamespace

Defined in: packages/svelte/src/index.ts:787

Exposes shared-state helpers for the adapter.

shared<T>(key, options): readonly [Writable<T>, (nextValue) => void]

Defined in: packages/svelte/src/index.ts:796

Creates or reuses a shared-state binding.

T

The shared state value type.

string

The logical binding key used to reuse the same shared-state engine.

StateOptions<T>

The shared-state configuration, including initialValue.

readonly [Writable<T>, (nextValue) => void]

A Svelte writable store and setter pair.