Reactive state and effects management
:warning: This documentation is work in progress for the upcoming 3.0.0 version. There is however NO good reason to use 2.x over 3.0.0-rc46, so please start with the rc-version (3.0.0 will be the first version I'm going to advertise publicly, so it's more like a 1.0 in reality.). 2.x is deprecated and will NOT be maintained in any way.
It's mainly documentation that needs improvement prior to the final 3.0.0 realease. It is however possible that I will introduce minor breaking changes until 3.0.0 is finally released.
npm install --save @rx-signals/store@3.0.0-rc46
RxJs is the one and only dependency.
rx-signals is a library for the MVU (Model-View-Update) pattern.
It is however not limited to MVU, but can be used in all architectures that would benefit from its features:
Though it heavily relies on RxJs, this lib is not Angular-specific. You can (and should) also use it in any other context where you have RxJs at your disposal!
(Use it in the backend or with any presentation-framework you like. Decoupling application-logic from presentation-logic is a strength of this library.)
rx-signals itself is implemented with TypeScript and therefore naturally comes with first-class type-safety.
This lib comes with a
See rx-signals design goals for more.
What does rx-signals mean anyway? Well the rx stands for reactive extensions, so it's the same rx as in RxJs, giving tribute to this congenial lib that is the base of rx-signals. The term signals is lent from the world of functional reactive programming (FRP), that knows two types of signals. The first type are Events being a signal of values occurring at discrete points of time. The second type of signals are Behaviors that represent values that vary over time in response to Events.
In RP (Reactive Programming), we can define Events and Behaviors as follows:
So an RxJs example for behaviors would be a BehaviorSubject, while an example for event-streams would be a Subject. Thus, in RxJs-world you can translate signal as observable.
You should start with my introduction to MVU, State Management, Reactive Programming and Effects Management, if
Otherwise, you may start with Using rx-signals. Where necessary, it will still link to the corresponding passages of the formerly mentioned introduction.
The full API-documentation (as generated from the doc strings) can be found here
If you want to use this library in an Angular project, I suggest using the @rx-signals/angular-provider in addition.
An introduction for people with NgRx background can be found here
Generated using TypeDoc