Skip to content
qubeejs/angular
API/QubeeSignalStore

QubeeSignalStore

class@qubeejs/angular1 signalssrc/lib/services/qubee-signal-store.ts

The query-builder state container, made reactive for Angular

Extends the framework-agnostic QubeeStore from @qubeejs/core with a single addition: state, a read-only Signal mirroring the store’s snapshot. The core exposes state through getSnapshot() + subscribe() (the useSyncExternalStore contract) and deliberately ships no reactivity of its own; this class is where the Angular adapter supplies it.

One instance is shared per injector scope by QubeeQueryBuilder and QubeePaginator: the builder writes to it, the paginator syncs page metadata back into it, and both derive their signals from it.

Snapshots are deeply frozen by the core, so a consumer cannot corrupt the state by mutating what state() returns — an attempt throws in strict mode instead of silently poisoning later reads.

Extends QubeeStore from @qubeejs/core; the members it inherits are documented in the core reference ↗.

const store = inject(QubeeSignalStore);
effect(() => console.log('page is now', store.state().page));
Member Type Description
state Signal<QueryBuilderState> The current query-builder state as a read-only signal. Notifies exactly when the state differs from the previous one, so computed(), effect() and templates re-evaluate on real changes only.