State
A State that can be used to bind Nodes and their properties. You can get the
current value with myState.value, and update with myState.value = newValue.
These two methods are protected, so that state update logic is encapsulated
within the object itself. This provides the same benefit as Redux's action -
reducer - store trifecta.
- Type parameters:
- V
the value.
- Value parameters:
- initialValue
The State's initial value, discarded if the StorageManager can fetch a value.
- storageManager
How the State should be persisted, such as in LocalStorage. By default, the State has no storage.