API reference@evolu/commonStore › ReadonlyStore

Defined in: packages/common/src/Store.ts:29

A read-only view of a Store that provides state access and change notifications without allowing modifications.

Use ReadonlyStore in public APIs where consumers should observe state but not modify it directly.

Extends

Extended by

Methods

[dispose]()

dispose: void;

Defined in: node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts:36

Inherited from

Disposable.[dispose]

Properties

get

readonly get: () => T;

Defined in: packages/common/src/Store.ts:31

Returns the current state of the store.

subscribe

readonly subscribe: (listener: Listener) => Unsubscribe;

Defined in: packages/common/src/Store.ts:37

Registers a listener to be called on state changes and returns a function to unsubscribe.