Custom Variable
The Goal
Add and set up Custom Variable and check its setting in the Data Explorer.

The Description
The State Variable is part of a current View where its setting is immediately reflected in the Data Explorer and its plays important role in storing temporary data within a current View.
The Knowledge You Will Get
Addressing and Editing of a State Variable.
The Project Structure
1. Create a State Variable
Clicking on the Add Datasource icon select Add State Variable.
Name its ID ->
myVariable
and switch its Type to Number; Initial Value ->6
2. Associating myVariable
Value
myVariable
ValueConsider that we are not going to play with Layout; simply place in the Canvas work field a new Text component and set up its Value as follows:
Value ->
myVariable.value
The Conclusion
Using the State Variable can be effectively used in many cases. Try to change State Variable Types to Array or Map, and define their Values as a constant or function.
Last updated
Was this helpful?