Store & StoredValue

Guide: State.

Store(T) — field-grained reactive struct

ExportSignature
createStore / Store(T).create(comptime T, owner, initial: T) !*Store(T)
MethodNotes
get(comptime field) FieldTypereactive read of one field
peek(comptime field) FieldTypeuntracked
set(comptime field, value) voidnotifies that field's subscribers only

One signal per struct field, generated at comptime — cross-field updates never cause unrelated re-runs.

StoredValue(T) — non-reactive cell

MemberSignature
StoredValue(T).create(comptime T, owner, initial) !*StoredValue(T)
get() T / getPtr() *T / set(v) voidplain access, no notifications

Lives exactly as long as its owner; disposed with the scope.

Chunk-side persistence

verve.storage (localStorage): set(key, value), get(key, buf) []const u8, len(key) u32, remove(key).