Properties
info
Here useful properties of the State
are listed.
agileInstance
#
Agile Instance to which the State belongs
Note that it is stored as a function in the State, to avoid endless deep classes.
key
#
Current key/name of the State.
It is used to uniquely identify the State.
Besides getting the key
, we can also assign a new key
with help of this property.
valueType
#
Current type of the value.
This property is only useful if you are using Javascript, because for Typescript there are better solutions, like generic types.
isSet
#
If the current State Value differ from the initial State Value.
isPlaceholder
#
If the State is a placeholder.
For instance, it might be a placeholder if it hasn't been instantiated yet, but AgileTs needs to hold a reference to it.
This is the case if we bind a maybe not existing Group with the getGroupWithReference
function to a Component.
Then AgileTs creates a placeholder Group for us, to ensure that the Component rerender whenever
the real Group got created.
initialStateValue
#
The first Value which got firstly assigned to the State.
value
#
The current Value of the State.
Besides getting the value
, we can also assign a new value
with help of this property.
previousStateValue
#
The State Value, which has been assigned to the State, before the current active Value.
nextStateValue
#
The State Value, which will be assigned to the State as next. Often this is the current Value, because AgileTs is pretty fast in assigning new Values ๐.
The nextStateValue
will be used as next value, if we ingest the State without any specific new value into the runtime.
isPersisted
#
If the State Value got successfully persisted into an external Storage like the Local Storage.