Helper Store type that is used as a partial type.
This type is very helpful when you want to pass the store to pieces of your application
that must be aware of the type of state that the app manages but they should not care about
the logic part (that is, the dependency container). A very common case is when you want to
pass the store to the UI of your application. The UI shouldn’t access to the dependency container
directly (it should dispatch a
SideEffect instead) but you can still have type-safety over the
state type that is managed.
Warningyou should not create this class directly. The class is meant to be used as a partial type erasure system over
Closure that is used to initialize the state
public typealias StateInitializer<T> = () -> T
The current state of the application
open fileprivate(set) var state: S