Store
-
The
Store
is a centralized container for a single-source-of-truthState
.A
Store
is configured by registering all the desiredReducer
s andEffects
.An
Environment
can be set up to enable dependency injection inEffect
s.Usage
To update the
State
callers dispatchAction
s on theStore
.Selecting
To select a value in the
State
the callers can either use aSelector
or a key path. It is possible to get aPublisher
for the value or just to select the current value.Interceptors
It is possible to intercept all
See moreAction
s andState
changes by registering anInterceptor
.Declaration
Swift
open class Store<State, Environment> : ObservableObject
extension Store: Subscriber