QubeeSignalStore
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));Properties
Section titled “Properties”| 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. |