📄️ rxState (functional)
The functional way to create and configure an RxState instance. rxState() is a wrapper around the class-based RxState service that binds its lifecycle to the current injection context; the instance is destroyed automatically when the host component/directive/service is destroyed. It is the modern default for local reactive state; the class API is the legacy surface.
📄️ RxState (class)
RxState is a light-weight reactive state management service for managing local state in Angular. This page documents the class-based API, the legacy surface. For new code, prefer the functional rxState() creator, which wraps this class and binds its lifecycle to the injection context automatically.
📄️ CompareFn
The function which is used by KeyCompareMap to determine if changes are distinct or not. Should return true if values are equal.
📄️ KeyCompareMap
The KeyCompareMap is used to configure custom comparison for defined keys.
📄️ RxState configuration
RxState instances read two settings from the DI tree: the scheduler that drives state computation and the accumulator that merges each change into the state. Both are provided with the provideRxStateConfig provider function and its configuration features.
📄️ rxActions
The functional way to create an RxActions instance: a typed set of event channels that turns an actions interface into a dispatcher (login(...)), an observable stream (login$), and a side-effect binder (onLogin(...)) for each key. It is imported from the @rx-angular/state/actions secondary entry point and must be called within an injection context; the instance is destroyed automatically when the host component/directive/service is destroyed.
📄️ rxEffects
rxEffects is the functional creation function for RxEffects, a small helper that runs Observable- or Promise-based side effects and cleans up their subscriptions automatically when the current injection context is destroyed. It replaces manual subscribe / takeUntil(destroy$) / ngOnDestroy boilerplate.
📄️ distinctUntilSomeChanged
RxJS operator that emits items from the source Observable that are distinct by comparison from the previous item, comparing each key in the keys array. It is named distinctUntilSomeChanged because it iterates the keys and uses Array.prototype.some to decide whether values are distinct.
📄️ Partial updates
RxState has partial updates built in. Every change sent to the state over set or connect is treated as a partial update: an instance typed with T accepts Partial on both methods, and the change is merged into the current state.
📄️ selectSlice
RxJS operator that emits only the provided keys from the source Observable. Each key is filtered to emit only defined values and checked for distinct emissions; comparison is done for each key in the keys array. A selection is only emitted when it is valid (every selected key must exist and be defined in the source), so the operator always yields a complete slice with all values present.
📄️ select
RxJS operator that reads a slice of state as a shared, replayed, distinct Observable. It removes the need to think about late subscribers, multiple subscribers, or repeated emissions of the same value. select has several overloads: read the whole state, apply operators, access a (possibly nested) key by path, or transform a key/slice with a projection function.
📄️ Selections operators
A set of RxJS operators for selecting state in an efficient, distinct way. They are the building blocks RxState uses internally for its select surface, and they are exported so you can use them directly inside your own RxJS pipelines.
📄️ stateful
RxJS operator that turns an arbitrary source Observable into a stateful one: it emits only distinct and defined values, and shares/replays the result for multiple subscribers. It behaves like the Observable pipe method (pass zero or more RxJS operators and they are composed in order) while adding the repetitive state-processing guarantees on top.