EnvironmentStore is a singleton service responsible for maintaining a reference to all the technical or functional properties that the application needs. It is the most important service of the library and must be implemented to manage the environment state.
Can be integrated into any application using the provided default implementation or creating a custom one to integrate it with any state manager already used by the application.
It is important to ensure that the store update is an overwrite and not a partial update,
because the service will manage the entire environment in the implementation,
and a partial update can cause inconsistencies.
Environment Store
EnvironmentStore is a singleton service responsible for maintaining a reference to all the technical or functional properties that the application needs. It is the most important service of the library and must be implemented to manage the environment state.
Can be integrated into any application using the provided default implementation or creating a custom one to integrate it with any state manager already used by the application.
DefaultEnvironmentStore
A basic RxJS environment store implementation that uses a BehaviorSubject as state manager that can be instantiated from...
DefaultEnvironmentStore
.Use cases
Below are examples of the expected behavior and some custom implementation examples.
Table of Contents
getAll$
Returns the values of all properties in the EnvironmentState asynchronously, emitting an Observable each time it changes.
getAll
Returns the values of all the propertiesin the EnvironmentState synchronously, the one that exists at that moment.
update
It is important to ensure that the store update is an overwrite and not a partial update, because the service will manage the entire environment in the implementation, and a partial update can cause inconsistencies.
reset
Resets the initial EnvironmentState to the provided one.
Implementation using Redux
Redux is a predictable state container for JavaScript apps.
Implementation using Akita
Akita is a state management pattern built on top of RxJS.