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

Interface: StateNamespace

@roomful/svelte


@roomful/svelte / StateNamespace

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

Exposes shared-state helpers for the adapter.

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.

T

The shared state value type.

string

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

T

The initial shared-state value.

Omit<StateOptions<T>, "initialValue">

Optional shared-state configuration overrides.

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

A Svelte writable store and setter pair.