@threadplane/renderFunctionv0.3.4

signalStateStore

Create a signal-backed StateStore for a generative-UI surface — holds the bound state that spec $bindState paths read and interactive elements write, with path-addressable get/set and change subscriptions.

Every path is a JSON Pointer and must start with / (or be '' / '/' for the root); a slash-less path throws.

import { signalStateStore } from '@threadplane/render';

Declaration · overload 1

export declare function signalStateStore(initialState?: StateModel): SignalStateStore;

Parameters

initialState · optional
StateModel

Optional starting state object.

Returns

SignalStateStore

A SignalStateStore bridging Angular signals to the render engine.

Examples

const store = signalStateStore({ count: 0 });
store.set('/count', 1);
store.lastChange?.(); // { path: '/count', value: 1 }